WiP: Add uniter changes to support reboot

This PR adds the uniter changes 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
https://github.com/juju/juju/pull/833

there are 2 functions used here to execute commands. One is defined in this file, and the other is the one in github.com/juju/utils/exec . I think the one in utils is used with juju-run because it allows the user to use things like tilde expansion, making the environment more friendly for interactive command execution.

I did not think that we wanted to be able to run bodies of scripts via juju-run, and thus needing to be able to replicate the exact same conditions that we do for hooks. These two things were clearly designed different, or the original author would have used the same exec function in both cases. I will change the PR to account for the juju-run case.