A developer snapped up two affordable housing projects in Los Angeles and plans to spend millions renovating them at a time when investors and public officials are looking to increase and improve the stock of housing for lower-income renters throughout the country.