state: infrastructure for synchronising state server upgrades

Introduce a new UpgradeInfo struct (and underlying mongo document) which will be used by state servers to synchronise tools upgrades.

Later commits will integrate this infrastructure with the upgrade machinery in jujud.

William Reade and Menno Smits both contributed to this revision.
if this returns an error, do any more cleanup functions run ?

maybe change this to c.Check ?