Fixed a bug in the java stubs for event.from()
VM state detection is done
Much better version of the vm state detection based on xenserver events