[CB-4545] support for merges directory on both wp7 & wp8
Merge branch 'origin/master'
[CB-4837]: Version 3.0.10. Depends on Plugman 0.12.x.
Refactor to use Q.js promises in place of callbacks everywhere.

This significantly cleans up many parts of the code, and generally
shortens it by 25%, by dropping redundant error checks.

NOTE: This DOES NOT change the "public" API of CLI, in the sense
that cordova.foo still takes a callback. Under the hood, it wraps a call
to cordova.raw.foo. If you downstream CLI and require modules like
platform.js directly, (a) stop, and (b) you'll have to port to promises.

I created the cordova-3.1.x branch for all bugfixes for the 3.1.0
release, since this code should probably bake for a while before being
released to npm.

Mostly fixed tests.

Fixed all tests (expect the broken BB10 ones)

Cleaning up debugging output

First pass over async refactoring.

build spec passing

CLI and Compile specs passing.

Create tests repaired.

Fixed tests for emulate, hooker, and lazy_load.

Fixed platform tests.

Fixed plugin tests.

Prepare tests fixed.

Run tests passing.

Fixing some of the parser tests.

Platform parser tests all fixed.

And the final burst of tests fixed.

Fix a few error messages and other problems.

Refactor to preserve top-level semantics.

Add tests for the cordova.foo -> cordova.raw.foo wrappers
[CB-4604] Execute hooks directly (not .bat files) cross-platform
Remove two debugger; lines that snuck in.
reapplied change to add event mid build to allow mods to www folder pre_package  aka 775e969f9cc27a580123897d922121d564d4554d
[CB-4883]: Graceful handling of lazy loading errors.

Shows good error messages, and doesn't leave junk in the cache, on
failed lazy load downloads.
First pass
Fix busted test.
[CB-4877]: Add basic logging, --silent flag.
Fix cli.js tests broken by --silent change.
Bumping elementtree version to 0.1.5 to match plugman and support namespaced xml elements
Fixes a bug where cordova prepare bombs on a config missing a content
element
  - Changes an undefined check to falsey to cover random null value
    returned from elementtree

  Tested By: David Kemp <drkemp@google.com> via Medic
[CB-4774] Display proper error if cordova prepare run not in project dir.

cordova prepare fails with a cryptic error message if run not from
cordova project dir:
  TypeError: Arguments to path.join must be strings
Fixed it to display the usual:
  Error: Current working directory is not a Cordova-based project.
Update "cordova serve" to work with promises refactoring
Make cordova serve ignore dot files.
Log requests in cordova serve
[CB-4621] Updating run and emulate commands to always provide default options
CB-5032: clarify the help text