Influence of Structure on Magnetic and Photoluminescent Properties of Coordination Compounds of 3d and 4f Metals and Nanocomposites Based on Them