qcow: Calculate correct refcount table size and zero it
qcow: Calculate correct refcount table size and zero it

The reference count table must be continuous in the file, not
preallocating it when creating a file causes errors when setting
reference counts for new blocks later.

BUG=809847
TEST=Replay formatting and downloading container events.
Add unit test that catches error with default files.

Change-Id: I08840958a1180a73f32f42d520517bcf88a158b0
Signed-off-by: Dylan Reid <c791bfe44996c1eed9c7149a0c5f12a86d58eb85@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/909915

google/crosvm,google/crosvm,google/crosvm,google/crosvm