Patch for recover, clean and ssh timeout restart/reboot/termination

Here are the clean and recover function I talked about.

I also included the restart/reboot/terminate feature for ssh timeouts as it more or less goes in pair with the recover functionality.

I checked out your latest develop head and made a bunch of edit to integrate code from my core. Though my core runs very well, I did not test this particular branch and so I do not expect it to run w/o issues out of the box. I doubt you'll want to integrate it this way anyway. Lets start a discussion and see how we can improve on it. And if you like it as it is, I can test it and come back to you whenever I feel it's ready.