Review comments from Andrew.
Refactoring plugin_loader

- Use the main cordova-js modulemapper, instead of a duplicated fork.
- Add onPluginsReady event to cordova-js, if and only if a magic
  variable is set in cordova.js by the generated code. This hides the
  new behavior from other cordova apps until this prototype is standard.
- Put the script tag injection code into a function and call it, shorter
  generated code.