WiP: Add machine reboot support

This PR adds changes in the machine agent needed to support reboot.

Depends on:

https://github.com/juju/juju/pull/707
https://github.com/juju/juju/pull/728
https://github.com/juju/juju/pull/744
https://github.com/juju/juju/pull/782
I definitely don't think it's cleaner to do it there, because any number of things could go wrong before the reboot actually happens -- we should err in favour of rebooting at least once, rather than at most once. I think I'm unmoved here: we really shouldn't be clearing the reboot flag until we've actually done a reboot, and that means we shouldn't do it until we come up again (having written out some file somewhere saying "rebooting: %uptime", and reading it in when we start up. Now I think of it, we could probably do all that in the reboot worker -- ie grab the lock and write out our intention to reboot before we return from the worker, and check for a smaller uptime than the current when we start up the worker (and if we find one, clear the flag and release the lock).