Update clone test

The clone model test assumes that the default VM is running so it can
expect an exception when trying to clone that VM. But that's not always
the case. Also, the test doesn't wait for the clone operation to finish,
which sometimes may cause an error.

Make sure the VM used in the test is running before cloning it
(expecting an exception) and wait for the clone task to finish before
moving on to the next test.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Create domain snapshots

A new command is added to create a new snapshot:

POST /vms/<vm-name>/snapshots {'name': '<snapshot-name>'}

It creates a new snapshot with the current state of the VM. Currently,
due to Kimchi not supporting paused states, snapshots can only be
created when the VM is shut off. The parameter 'name' is optional;
Kimchi will create a default value based on the current time if it's not
provided.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Lookup a domain snapshot

A new command is added to look up an existing snapshot:

GET /vms/<vm-name>/snapshots/<snapshot-name>

It returns the following values:

* created: The time when the snapshot was created (in seconds, since the
    Unix Epoch);
* name: The snapshot name;
* parent: The name of the parent snapshot;
* state: The corresponding VM state when the snapshot was created
    (currently, it can only be 'shutoff');

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: List domain snapshots

A new command is added to list all existing snapshots on a virtual
machine:

GET /vms/<vm-name>/snapshots

It returns a list of snapshot structures (as returned by 'GET
/vms/<vm-name>/snapshots/<snapshot-name>') which exist on a virtual
machine.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Delete a domain snapshot

A new command is added to delete an existing snapshot:

DELETE /vms/<vm-name>/snapshots/<snapshot-name>

It deletes the specified snapshot from the virtual machine.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Lookup current snapshot on a domain

A new command is added to look up the current snapshot on a virtual
machine:

GET /vms/<vm-name>/snapshots/current

It returns a snapshot structure (as returned by 'GET
/vms/<vm-name>/snapshots/<snapshot-name>') of the current snapshot on
the specified virtual machine. If the VM doesn't have a current
snapshot, an exception will be returned.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Revert a domain to a snapshot

A new command is added to revert a virtual machine to a specified
snapshot:

POST /vms/<vm-name>/snapshots/<snapshot-name>/revert

It changes the specified VM state to the exact same one as it was when
the snapshot was created.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Add model tests

Add the model tests related to snapshot.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Delete snapshots when deleting a VM

If a virtual machine is deleted, its snapshots should also be deleted.

Update the function "VMModel.delete" in order to delete snapshots
before deleting the virtual machine.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
snapshot: Clone snapshots when cloning a VM

If a virtual machine is cloned, its snapshots should also be cloned so
we can have a real clone of the original VM.

Update the function "VMModel.clone" in order to clone the snapshots when
cloning a VM.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>