Reorder imports on module_render
Rename arguments of modx_dispatch and handle_ajax related functions

Refactor a bit modx_dispatch
Merge pull request #258 from edx/rocha/pre-external-grader-cleanup

Cleanup before adding external grader