Optical, Spectroscopic and Structural Characterization of Glasses and Planar Waveguides Activated by Rare-Earth Ions