o   In image_set_size(), don't truncate the swap file. It isn't holding
    the entire image data anymore.
o   Prepare for changes to image_write(): partitioning schemes call
    image_write() to fill in the sectors they reserved from themselves.
    Since we're talking about a handful of sectors, there's no need to
    have them in the swap file. Change struct chunk to accomodate for
    that. A chunk now has a type. That type can be "zeroes", "file" or
    "memory".
o   Flesh out the cleanup function: iterate over the chunks and close
    or free the corresponding data container. Free the chunk as well.
Implement image_write():
For every sector in the buffer, find the chunk that contains it
and break it up (if it's not already a memory chunk) so that we
have have a new chunk for every sector being written. We don't
write to chunks for type file, because we may not be able to
write and we don't want to clobber partition data.

We don't try to combine adjacent chunks of type memory into a
single one. It doesn't seem to have any significant upsides
other than reducing syscall overhead. The downsides includes
"excessive" copying and memory fragmantation. Without any kind
of benchmarking, simplicity wins.
Implement image_data(): we now simply call image_chunk_find() to
get the chunk that contains the block and we effectively have the
answer right away. Account for the as-of-yet non-existent case of
having multiple chunks of type zeroes adjacent to each other and
having to handle chunk-crossing -- hence the loop.
Implement image_copyout_region(): This is the one function that is
responsible for writing to the output file. For eack chunk that
covers all or parts of the region to write, call a corresponding
function that knows how to write a chunk of that type:

image_copyout_memory():	Use write(2) to write the buffer.
image_copyout_zeroes():	Try and seek forward to create a sparse
	file. If that fails, scribble zeroes to the output file to
	support writing to stdout. Use image_copyout_memoryIO for
	that.
image_copyout_file():	Iteratively map bits of the input file and
	use image_copyout_memory() to write the bits to the output
	file.

With this commit all unit tests pass again.
Remove image_chunk_dump() and its call-site. I used it for debugging
in the beginning, but not at the end. So, its value is marginal.

Below a performance comparison while running the unit test:

x old
+ new
    N           Min           Max        Median           Avg        Stddev
x   5         57.48         58.28         57.58        57.736    0.33886576
+   5         46.82         47.61         46.93        47.034    0.32791767
Difference at 95.0% confidence
	-10.702 +/- 0.486298
	-18.5361% +/- 0.842279%
	(Student's t, pooled s = 0.333437)
Remove DEBUG_FLAGS again.
Bump the version to 20141001.
Fix sloppy code (that was commented as such): Map the file with
partition data using smaller pieces at at time. It's rather hard
to map a 10G partition in memory on a 32-bit machine...
Make sure to widen secsz from size_t to off_t when using it as a mask.
On 32-bit machines this would other wise mask off the upper 32-bits
of the 64-bit file offset.
Make sure the cookies are constants of appropriate width.