Fix x86 KVM snapshot crash on save, and inability to load snapshots.

This patch fixes a crash that happens when trying to save a snapshot
of an x86 system image while KVM is active. The crash comes from the
fact that the machine maps RAM pages just at the end of the physical
address space [0xfffe_0000 ... 0x1_0000_0000], and this results in
a wrap around to 0 when adding the start address and its size in
kvm-all.c, which later becomes extremely confused.

This prevented the inner loop in kvm_physical_sync_dirty_bitmap()
from stopping, making the code happily trash memory by passing invalid
high addresses to cpu_physical_memory_set_dirty().

The patch fixes multiple issues in kvm-all.c to ensure that wrap-around
are treated properly. There may be other issues in the rest of the cod.e

Hopefully, this problem should disappear very soon when we upgrade
to use the new QEMU MemoryRegion/AddressSpace API instead, and switch
hwaddr to always be 64-bits.

The patch also fixes the fact that snapshots could not be loaded properly
anymore on x86, because this machine uses more than one RAM block, and
the code forgot to give a unique name to each one of them when saving
the snapshot.

+ Add docs/QEMU-MEMORY-MANAGEMENT.TXT which tries to document how
  QEMU managed memory at the moment (still misses KVM/HAX specifics
  though and a description of the CPU TLB).

BUG=13941159

Change-Id: I877c89b8850aeb298ccbdbab43be01be10f89e9b
3 files changed