Structure and Mechanisms of Formation of Nanosized Films of Impurity Metal of Cobalt and Nickel in Single Crystals of LiF and MgF2