Use the module pattern to clean up the global namespace

This patch moves all of the dopamine objects into anonymous namespaces
and each module attaches itself to the main dopamin object.  That way,
we don't pollute the global namespace.  Note: we still defer the
allocation of object until they are used by overriding getters.  We do
this to ensure that the full namespace has been formed before using
any part of it.