Rename arguments of modx_dispatch and handle_ajax related functions

Refactor a bit modx_dispatch