Use AMD for Query Executor module

Lots of work to coerce Jasmine to run tests on AMD module.