roughly break up test files; extract context.Factory
add a bunch of failing tests
add basic tests for Factory; move non-Factory NewHookContext func into export_test (to keep existing tests passing, but prevent other people from creating contexts in unhelpful ways
address review
drop proxy rubbish
state: machines & related collections now use env UUID based ids

The following collections are now using environment UUID based
document ids in preparation for multi-environment support: machines
containerRefs, instanceData & reboot.
state: made allwatcher end-to-end test more comprehensive

The test was previously only testing machine related events but now
includes units and services.
Added instanceData to ConnSuite setup

... and cleaned up how collections are opened.
state: hacks to support the env UUID upgrade for the machines collection

This change introduces a few hacks that are needed to allow a state
machine to start before the environment UUID migrations have been
applied to the machines and instanceData collections. Without this the
machine agent can't start in order to run the required database
migrations.
state: move machine related env UUID migrations to 1.21-alpha3

1.21-alpha2 was just released so the machines, instanceData and
containerRefs migration steps had to be moved to alpha3.

Unnecessary test boilerplate has also been removed and the tests now
check that the upgrade steps for a particular version have been
included in the global list of upgrade operations.
Merge pull request #914 from mjs/machines-env-uuid

state: machines & related collections now use env UUID based ids

The following collections are now using environment UUID based document ids in preparation for multi-environment support: machines, containerRefs, instanceData & reboot.

http://reviews.vapour.ws/r/175/diff/
Merge pull request #939 from fwereade/uniter-context-factory

Uniter context factory

Hook contexts are now created more simply. Expect further followups, to extract more of the logic currently still in the Uniter -- in particular, the NewActionContext bit is not good as it stands, but I don't want to grow the PR too far.