On Covariate Shift of Latent Confounders in Imitation and Reinforcement Learning