JPMorgan Chase has agreed to pay $20 million to settle a federal suit over the handling of Lehman Brothers customer funds in connection with the firm’s spectacular 2008 collapse.