Integrated Latent Heterogeneity and Invariance Learning in Kernel Space