CB-6767 Allow `cordova` to be replacable

Allow specifying the name of the binary for phrasing error and warning messages
with the proper binary name.

github: close #179
CB-6813 Add license to CONTRIBUTING.md
Add --usenpm flag to activate npm based lazy_load

See the corresponding change in colrdova-lib
https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;a=commit;h=55810360fe
CB-6859 remove wp7 as platform
CB-6024: Use nopt instead of optimist in cli

Why:
 - Optimist was killed by the author (he recommends minimist as replacement)
 - We already use nopt in plugman cli
 - Make cli parsing cleaner

 Changes:
 - No more manual parsing of the args array
 - cli vars for plugin add passed down as part of opts, not part of targets
 - cli is now a regular function rather than a class, it was never properly
   used as a class.
 - Flags to be passed to platform run scripts are parsed by nopt.
 - To pass arbitrary flags unknown to cli down to platform scripts,
   they must be separated by " -- " from other args, for example:
   cordova compile ios -- -d --foo=bar
   anything after " -- " will not be interpreted by the cli.
Set version to -dev
Show full stack for CordovaError in verbose mode

With -d or --verbose command line arg, cordova will now show full stack for
any uncaught exception including CordovaError.
Update cordova-lib dependency in package.json
Fix comment - CordovaError message vs. full stack trace.
CB-6943 Path can include the : if it is absolute, only test for http. Added tests
Removed wp7 from existence
[CB-6740][amazon-fireos]Clean up error reporting when AmazonWebView SDK not found

Updated cli readme to point to correct location to copy AWV SDK.
CB-6954: Use the unified cordova_lib.events

After events got shared between cordova and plugman, some log messages were
printed multiple times since handlers were registered twice in the cli:
cordova.on(...)
plugman.on(...)
changing it to
events.on(...)
CB-6943: Fixe cli tets on non-windows.

The previous commit for this bug
f6e73a61683ed2160eaa1da97f6cfacbc6aea0ac
broke the cli jasmine tests for non Windows platforms.

Custom www path gets path.resolved. Paths beginning with C:\ get resolved to
something like this on Os X:
/Users/joe/tst/c:\PrivateWWW

I replaced the specific expectation for the path with jasmine.any(Object).

Note, paths beginning with file:// don't get resolved properly either, so
they still don't work as custom www uri.

Looks like we need to write or find a smarter wrapper for path.resolve that can
take care of file:// and c:\
CB-6954: Use the unified cordova_lib.events in cli spec
CB-6976 Add support for Windows Universal apps (Windows 8.1 and WP 8.1)
CB-6728: Support chip architecture flag --archs

github: close #180
Merge branch 'win81' of https://github.com/MSOpenTech/cordova-cli
moved require('fs') to top
fix linting/hinting