A backport of PEP 562. Allows controlling a module's __dir__ and __getattr__.
Useful for deprecating attributes.
