hivex: Fix allocations that may move C heap buffer.
When heavily extending existing hive files, the malloc-allocated
in-memory copy of the hive may be moved when we reallocate it
(to increase its size). However we didn't adjust existing
pointers to cope with this, so sometimes you could get a segfault.
This patch fixes the issue by adjusting pointers as necessary
after calling (directly or indirectly) to the allocate_block
function.
With this patch I was able to allocate 10,000's of blocks in
a deeply nested hive structure without any problems being reported
by valgrind.