Add convenience methods for writing mapped blocks.

Implement a small set of operations on write-only data (seek, write,
unmap and close).
Use mmap to write to indexer packfile.

Make sure to open the packfile for reading and truncate when done.