JPMorgan Chase is transforming its mortgage business to make it recession-proof — even if it means profits suffer