Nanocavity lasers detect chemicals