Spiropyran photoswitching: From molecules to functional materials