A General Framework of Epistemic Forgetting and its Instantiation by Ranking Functions