After nearly a decade in power, the prime minister leaves a complicated legacy on housing and mortgage matters