Explicitly Correlated Gaussian Functions and Rovibrational Spectra of Diatomic Molecules