Luminescent chemosensors: from molecules to nanoparticles