not working yet
Merge branch 'master' into remove-apiconn-1326802
Replace juju.NewAPIConn with juju.NewAPIState.

This addresses bug #1326802. We don't want APIConn around, because it just
existed to keep track of an Environ which we don't want. We still needed a way
to open an api.State object from an Environ object in several places (NewAPIClientFromName
et al all use an environment *name*, but that doesn't work when we just created the
Environ details and want to open it.)

I also renamed 'apiconn_test.go' to 'api_test.go' because there is no APIConn anymore
so it doesn't make sense to have a test file named after it.
Track down some users of APIConn that didn't really need it anyway.
Find a few more places using NewAPIConn and actually fix the juju-restore plugin.
Merge branch 'master' into remove-apiconn-1326802
Turns out we end up with a 10m wait trying to connect to something that isn't there (apparently).

So we restore sanity in the test suite by passing along api.DialOpts and setting them to fail-fast
in the test suite.
Also find a couple of cases where the code was still not quite right.
man, fix one thing, break another... fix another place that I just broke.
Merge pull request #317 from jameinel/remove-apiconn-1326802

Remove apiconn (bug #1326802)

This addresses bug #1326802 by getting rid of the juju.APIConn structure.

There were still several places that already had an Environ object and just wanted to connect to it, so I provided NewAPIState to connect and return an api.State object (so we could share the environAPIInfo function, etc.)

Also, lots of places in the test suite were using JujuConnSuite.APIConn that didn't actually need it, so I cleaned those up. (Many just used it for the .APIConn.Environ but we already have just .Environ for that, and other places just used it to get the api.Info but we also already provided .APIInfo() which also handles error checking, etc.)