Rare-Earth Implanted MOS Devices for Silicon Photonics: Microstructural, Electrical and Optoelectronic Properties