Refactor test

i refactored the tests so that we test against the real thing `analytics.js`, the only change in code is that i expose `require()` on `analytics.require` so that i can require constructors etc..

only reason i pull request is that you guys can see that `require()` is now exposed.

Let me know what you think.

cc @calvinfo @ianstormtaylor