Rare-earth-doped glasses and ion-exchanged integrated optical amplifiers and lasers