Convert the existing mocked API to requirejs.

This commit allows our mocked API to make use of requirejs for loading the modules needed for the mock api to run.