BAMDP Shaping: a Unified Theoretical Framework for Intrinsic Motivation and Reward Shaping