On Causality in Domain Adaptation and Semi-Supervised Learning: an Information-Theoretic Analysis