(#13) Check for state before powering off

 This commit adds a check when powering off the VM prior to restoring a
 snapshot. Without this commit, the plugin will attempt to power off
 already halted machines, resulting in a failure.