CA-105003: Handle exceptions in get_shadow_allocation.

This fails when the VM has no VCPUs, which has been observed in
the wild. Also contains a workaround for CA-104562 by preventing
bizarrely large values being set.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Merge pull request #1215 from jonludlam/CA-105003

CA-105003: Handle exceptions in get_shadow_allocation.