Federal appeals court revives homeless lawsuit