Introduce Parse{Unit,Service,Machine}
Merge branch 'master' of https://github.com/juju/juju into 106-parsetag-refactor

Conflicts:
	state/api/deployer/unit.go
	state/api/firewaller/service.go
	state/api/provisioner/machine.go
wip
Update for juju/names part 3
Final tweak
state/machine: use WaitAgentPresence, rename AgentAlive
state/machine: StartSync in SetAgentPresence
state/machine: check IsManager and only Sync presence watcher
presencer: make the presencer interface official
state/presence: fixing issues from review
Bug #1328716: Clean up CONTRIBUTING a bit.
update to latest juju/names
Merge branch 'master' of https://github.com/juju/juju into 106-parsetag-refactor
fixups after merge from trunk
Merge pull request #103 from davecheney/106-parsetag-refactor

Update for juju/names refactor part 3

* Replace all the calls to ParseTag(tag, hint) to a specific ParseXXXTag method. 
* Where ParseTag is not called with a hint, adjust as necessary, there is one call for this in the codebase.
* Add some grossness where code like

type Unit struct { tag string }
func (u *Unit) Name() { _, id, err := names.ParseTag(tag, names.UnitTagKind); if err != nil { panic(err) } }

Into something a little more explicit using type specific ParseXXXTag methods.

In the next branch rather than storing the string form of the tag inside the Unit structure (without validation I may add), then parsing it (and possibly panicing) to get its Id, store a real Tag value in the struct then calls to name can just return the Id of the tag (or a more specific value available on the Tag's implementation type).
Handle constrained AZs

In EC2, an AZ may be "constrained", meaning that
you may not allocate new instances of certain
instance types to that AZ unless you already have
resources in that AZ. With this change we will
deal with this by attempting an a different AZ.

We'll now attempt all AZs until one either succeeds
or fails with an error other than one indicating
the AZ is constrained. We also now sort AZs by
population and then by name, to ensure the first
unit of each service is allocated to the same AZ
(barring pathological constrained AZ cases).

Fixes https://bugs.launchpad.net/juju-core/+bug/1330163
Close the state connection, and run the tests.
Add ResourceCatalog implementation
Merge pull request #65 from ericsnowcurrently/contributing-doc

Bug #1328716: Clean up CONTRIBUTING a bit.

Per Bug #1328716, here's a patch that updates CONTRIBUTING to mesh better with README.  It also fills in some gaps, particularly with tools, and makes the workflow more clear.  Given that working on this patch is my first exposure to the workflow I have no illusions as to perfect accuracy.  So feedback would be much appreciated.
provider/azure: don't fail Destroy if AG/vnet can't be destroyed

When destroying an environment, it is common for the Azure API
to not release references to the vnet until a significant amount
of time after destroying all related VMs. Thus, destroy-environment
will often fail.

This PR changes the Azure provider to only warn if the vnet or
affinity group cannot be destroyed. Bootstrap is modified to use
the vnet/AG if they are preexisting. If the vnet/AG are being
destroyed while bootstrap is called, then bootstrap will either
create a reference to them thus preventing their deletion, or will
fail and the user will have to bootstrap again.

Fixes https://bugs.launchpad.net/bugs/1324910