Court tosses out strict NYC homeless shelter rules