Adding requirejs and amdefine modules

Allow us to use requirejs modules with nodeunit tests
Updating modules and tests to use requirejs amdefine

makes testing much easier because we can use nodeunit