Theory of the Hall effect in heavy fermion and mixed valence systems