After canceling contracts with for-profit providers,the city is trying to develop a more compassionate halfway housing system. If done right, it could serve as a model for other cities. But the struggle to find affordable real estate and skilled providers to offer much-needed spaces continues.