MCA #323 - Initial implementation of appWindow show/hide/restore on android
Refactor pre/post-prepare hooks as in-process events based hooks

 - Hooks are now registered as events.on() and will run in the same process
 - Hooks access context data via the Context object passed in as argument
 - File based hooks replaced with a check that will fail if run with `cordova` and not `cca`
 - Use cordova-lib from cordova-cli and remove cordova-lib from direct dependencies
 - Requires a cordova-lib fix apache/cordova-lib@a2165e2f211be2ab3642b2e83b37c82862588a24
 - Add underscore for some convenience functions in pre-prepare

CCA had two copies of cordova-lib. One as direct dependency in
node-modules/cordova-lib
and the other as cordova-cli's dep in
node_modules/cordova/node_modules/corodva-lib.
The two copies might end up being of different versions, but even if they are
identical it still results in two separate instances of the EventEmitter and
breaks event registration and handling in some cases.
chrome.sockets.tcp: Fixed a NullPointerException on startup.
chrome.sockets.udp: Fixed a NullPointerException.
chrome.system.network: Fixed Xcode build errors.

closes #380
Unify and simplify upgrade-project and auto-upgrade

They were recursively calling each other and using the existence of platform
dirs as a flag that tells the other what to do.
Updated sockets.tcp and sockets.udp release notes and version number for release.
Added -dev suffix to sockets.tcp and sockets.udp plugin versions
Updated chrome.socket release notes and version number for release.
Added -dev suffix to chrome.socket plugin version
Auto-install platforms if none installed, was recently broken, fixed

If a project has no platforms installed, cca automatically installs platforms.
This was done by auto-upgarde.js and was accidentally removed in recent
refactoring in 97ab08ee9679e22f5de293bff356a00a873ff9d7
Reverting to this behaviour

Related to issue #272
Make iossocketcommon a `<dependency>` only for iOS platform

Plugman does have minimal support for this.
Fix cca check in hooks

Previously it was looking for "bin/cca" which is not there if running
src/cca.js directly or using the ./cca link from within the project dir.
Changed it to only look for "cca" substring in the command line.
Remove the old pre/post prepare hooks in upgrade-project
Make cordova-lib require still work if cordova-lib is installed globally
Make handling of CordovaError work in more cases (wasn't working for create command)
Teach cca that org.chromium.system.network is a dep of socket (fixes #381)
chrome-bootstrap: Throw an uncaught exception when background page is unloaded
Add chrome.sockets.secure.tcp and refactor chrome.sockets.*
Fix rewritePage when <!-- <body> --> exists (fixes #364)