Castlelake buys majority stake in US residential lending platforms