Metal nanoclusters formation in thin films and ion-exchanged waveguides for nonlinear optical application