Essays in Household Finance and Macroeconomics of Heterogeneous Agents