Generalizing Goal-Conditioned Reinforcement Learning with Variational Causal Reasoning