Measurement and exploitation of the thermo-optic effect in silicon for light switching in optoelectronic integrated circuits