$2.7 million meant to build homeless housing ended up with L.A. nonprofit, court records say