engine: test vm serialization/deserialization

The serialization/deserialization of VM tends to break, and it is
complex to figure out it breaks. Thus, this patch adds a test that
checks VM serialization and deserialization.

Change-Id: I643e8d1ce1ec570a305e3eb3ecfb5aa846fc1849
Signed-off-by: Arik Hadas <ahadas@redhat.com>