Photofunctions of Metal Complexes: From Fundamental Aspects to Applications