backport reboot tool to 1.21

As discussed with @fwereade, this is just a backport of:

https://github.com/juju/juju/pull/1086

to the 1.21 branch.