Mortgage Design in an Equilibrium Model of the Housing Market