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.
Mark module-level variables as var to pull out of global scope
switch to idiomatic.js typeof use
Merge pull request #16 from AdrenalineBrowser/module_pattern

Module pattern