zpm: (bundle) rename var containing auth params

The var was called "deploy"; it's been renamed to "auth", which I think
is more appropriate (since it contains, "auth url", "username",
"password" etc.). It doesn't really have anything specifically to do
with "deploy".
zpm: abstract _prepare_auth function

This function encapsulates the preparation of auth args, removing some
of the "clutter" from the `deploy_project` function.

This makes it easier to (potentially) compose small functions together
for multiple uses, and it makes unit testing easier.
zpm: (deploy) prepare authentication args first

This just cleans up the order in which things happen during deployment.
Previously, it was:

1. Get connection
2. Upload .zapp file
3. Upload job .json file
4. Prepare auth args
5. Render UI (with auth args), upload UI

The goal is to group the uploads together better, so that uploads all
happen together (and could be abstracted into a separate function). The
new order is as follows:

1. Get connection
2. Prepare auth args
3. Upload .zapp file
4. Upload job .json file
5. Render UI (with auth args), upload UI

No functionality changes here; this is pure refactoring.
zpm: abstract deployment to _deploy_zapp function

All of the actual upload/put calls are now done in `_deploy_zapp`.
zpm: add ZeroCloudConnection.authenticate method

The storage url and auth token are not cached on the connection until a
command is successfully executed. If `authenticate` is called, a
pre-authentication will be done to cache this data.
zpm: do preauth in `deploy_project`

Before we use the ZeroCloudConnection to deploy files, a preauth is
called. This is meant to ensure that the connection is always in a
consistent state before the actual deployment begins.

This helps with refactoring, too. For example, while trying to
refactor/reorder a bit of code that used this connection, I found that
the preparation of one upload relied on the fact that the previous
upload succeeded and set the `url` attributes of the connection object.

Doing this explicitly up-front prevents this sort issue from happening.
tests/test_zpm: add tests for zpm._prepare_auth
zpm: factor out deploy into Deployer class

All of the main functionality for deployment has been moved to the
Deployer class.

This makes for a good container for the various deploy functions and
utilities, and also will make things easier to test.
tests/test_zpm: test all the deploy things!

This adds tests for nearly all of the core deployment functionality, and
improves test coverage a lot. Previously, there was almost no test
coverage for this entire code path.
Merge pull request #127 from larsbutler/refactor-test-deploy

Refactor and test deploy