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.
Agreed that this was unclear. I've changed this part quite a bit.