Fixed #137. Added a system 404 page via hook_menu(). Moved the 404 handling mechanism from menu_execute_active_handler() to drupalgap_goto(), then added an invoke all on hook_404.