Merge pull request #79 from perrito666/translate_backup_to_go

Re wrote backup in go

Previously backup was a cmd plugin writen in bash.
Backup was implemented as a go function, still not in use.
Tests where added since the previous implementation had none.
backup package includes:
 * BackUp function, which performs the actual back up.
 * tarFiles which creates a tar or tar.gz/tgz depending
on the output file name given.
 * runCommand which is a convenience function to simplify testing
since the back up process requires calling external executable
mongoexport.
state/backup: gofmt
Merge branch 'master' into download-backup
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
Basic integration with real Backup function
Correct package reference
state/presence: fixing issues from review
Use EnvironConfig for mongo details required by Backup
Merge pull request #106 from axw/state-backup-gofmt

state/backup: gofmt

Run `go fmt` in `state/backup`.
fixed nasty race condition
Merge branch 'master' of https://github.com/juju/juju into fix-api-params
Assert that password and mongo port are used correctly. (Currently a stub test.)
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).