provider/maas: verify credentials early in bootstrap

Verify credentials early in the bootstrap process by
issuing a query to MAAS and checking the status code
on the response (i.e. check if it's 401). Provide a
user-friendly error message, and log the underlying
error at debug level.

Partially fixes https://bugs.launchpad.net/juju-core/+bug/1362072
Fix import grouping
Merge pull request #865 from axw/lp1362072-provider-verify-credentials-maas

provider/maas: verify credentials early in bootstrap

Verify credentials early in the bootstrap process by
issuing a query to MAAS and checking the status code
on the response (i.e. check if it's 401). Provide a
user-friendly error message, and log the underlying
error at debug level.

Partially fixes https://bugs.launchpad.net/juju-core/+bug/1362072