[CB-3927] Fix start-up race condition that could cause exec() responses to be dropped.

Requires a change to the JS as well.
CB-3949: Adding code to mitigate broken intents with the application installer
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cordova-android