Check if VM is already powered off before halting

Before this commit, rolling back a snapshot from a VM in a poweroff
state results in the below error:

Stderr: VBoxManage: error: Invalid machine state: PoweredOff (must be
Running, Paused or Stuck)

This commit adds a check to skip the halting step if the machine is
already off.