Excited molecules and clusters in solid media. Hydrogen and tetrahydrogen in ionic crystals