More flexible API for calendar mode

This unifies all the set calendar mode functions and methods into a single `Calendar.set_mode` method.

I have also renamed the module level `calendar` variable in ALL CAPS. The symbol is a constant pointing to effectively a singleton object, (even though the internals of the object may change).