Optical Sensing by Metamaterials and Metasurfaces: From Physics to Biomolecule Detection