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 plugman, in the sense
that plugman.foo still takes a callback. Under the hood, it wraps a call
to plugman.raw.foo. If you downstream plugman and require modules like
fetch 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.