Move calculcate_power_state to vmware_shared

TemplateVmware and VmVmware share the same logic for calculating the power_state
from the raw_power_state.

Moving this code to VmwareShared so that both classes share the same method definition.

https://bugzilla.redhat.com/show_bug.cgi?id=1115546
https://bugzilla.redhat.com/show_bug.cgi?id=1115557
Specs:  Clean up uses of state=

Remove straggling uses of state= where the value has already been replaced by
the raw_power_state value.

https://bugzilla.redhat.com/show_bug.cgi?id=1115546
https://bugzilla.redhat.com/show_bug.cgi?id=1115557
Remove VmOrTemplate#state=

The VmOrTemplate#state= became really confusing after adding in raw_power_state=
because VmOrTemplate#state= set raw_power_state, but VmOrTemplate#state returned
power_state.

Removing state= makes the picture a little clearer.

https://bugzilla.redhat.com/show_bug.cgi?id=1115546
https://bugzilla.redhat.com/show_bug.cgi?id=1115557
EmsEvent should call raw_power_state when possible

EmsEvent#change_event_target_state called target.state=, however, in the case of
VmOrTemplate, this should now be target.raw_power_state= since VmOrTemplate
no longer responds to state=

https://bugzilla.redhat.com/show_bug.cgi?id=1115546
https://bugzilla.redhat.com/show_bug.cgi?id=1115557
Event handlers should use raw_power_state= for vms

Now that VmOrTemplate#state= has been removed, event handler definitions should
set the raw_power_state directly.

https://bugzilla.redhat.com/show_bug.cgi?id=1115546
https://bugzilla.redhat.com/show_bug.cgi?id=1115557
Simplify VmOrTemplate#state

Now that the power_state is calculated correctly for different types of Vms Or
Templates, the VmOrTemplate#state method can be a little simpler.

https://bugzilla.redhat.com/show_bug.cgi?id=1115546
https://bugzilla.redhat.com/show_bug.cgi?id=1115557