Reorientations about fixed and mobile axes in molecular systems: A general formalism to calculate correlation functions