Domain Invariant Learning for Gaussian Processes and Bayesian Exploration