Cast `size` to int before comparison

`_get_and_check_image_metadata` pulls `size` from the image, which
comes in as string, but fails to convert it to an integer before
comparing with the flavor's `root_gb` size. This patch adds the cast
along with some test coverage for this method.

Fixes bug 1180159

Change-Id: I92bc9d6a808e49173d806e434cb145c751c8314a
Merge remote-tracking branch 'm_src_repo/citrix-fixes' into build-temp