In a broken mental health system, a tiny jail cell becomes an institution of last resort