Add internal API that allows replacing the main module loader

This can be used to load cordova modules before the application code is
executed, elininating the need to wrap it in a listener for deviceready.

Change-Id: Ic89b4a5329d51fcc4d2b9298ab14ac2807f3c592