Safe reboot mongo

If the requested node is primary then step it down before rebooting.

This is a bit hacky and could do with tidying up. I'm opening the pull request to solicit feedback and so I don't it by Monday.