added mocking framework

Couple of things here...

1) AdaptMock - a very simplistic stub for core. Has .setup(func) method to configure the stubbed members. 
2) contextFactory - monkeys with requirejs to create a new context containing the stubs instead of the core.

Some of the components and extensions are not testable due to static members and side effects. But this should go some way to giving the tools to test a plugin.