libvirt: Add virsh_blockcommit test

Test virsh command blockcommit:

    1) Prepare test environment.
    2) Commit changes from a snapshot down to its backing image.
    3) Recover test environment.
    4) Check result.

Signed-off-by: Guannan Ren <gren@redhat.com>
virsh.capabilities: fix bug for SMP machines

For machines that have more than one processor we must count all cores
for each processor to get the correct number of cpus.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>