Update to use new base txn struct
Merge branch 'master' of https://github.com/juju/juju into environ-resource-catalogs
Introduce new txn package and move transaction functionality from state
Revert resource catalog wor as this will be done downstream from the changes in this branch

This reverts commit 3f07858066fca5e9b5c167616988d7d87a618c4f.
Merge trunk and fix conflicts
Remore some defers
Re wrote backup in go

Previously restore 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.
added a summary and link to the docs in the readme
Update to use new base txn struct
Introduce new txn package and move transaction functionality from state
Revert resource catalog wor as this will be done downstream from the changes in this branch

This reverts commit 3f07858066fca5e9b5c167616988d7d87a618c4f.
Remore some defers
Refactor txn testing inftrastructure to separate testing package
State has txn runner attribute rather than embedding
Use explicit err for no transactions to run
Merge branch 'new-txn-package' of https://github.com/wallyworld/juju into new-txn-package

Conflicts:
	state/action_test.go
	state/addmachine.go
	state/annotator.go
	state/assign_test.go
	state/export_test.go
	state/machine.go
	state/machine_test.go
	state/minimumunits.go
	state/minimumunits_test.go
	state/open.go
	state/relation.go
	state/relationunit.go
	state/service.go
	state/state.go
	state/state_test.go
	state/txn/package_test.go
	state/txn/txn.go
	state/txn/txn_test.go
	state/unit.go
	state/unit_test.go
Refactored according to reviews

After reviews from @rogpeppe, @howbazaar, @mjs and @voidspace y
refactored a large part of how the tar files are tested, and
how the tar files are generated (most of that logic is to be
credited to @rogpeppe).
Now tar/tar.gz are built recursive and support prefixes to be
stripped if necessary (equivalent to -C on gnutar).
Tests check for files inside the tar and for the sum
Backup returns (filename, sum, err) instead of previous (filename,
sumfilename, err).
Various code review fixes
Fix some tests
Introduce Parse{Unit,Service,Machine}