Verify size in addition to checksum of uploaded image

Fixes bug 1092584

Previously only the supplied checksum was verified against the actual
checksum calculated by the backend store, with the image being killed
on mismatch.

Now we also similarly verify the supplied image size, if provided.

Change-Id: I87fa3ff77715111f1095f3ebe64cd699776ec27e