Add reliable_write helper function.

Just a wrapper around write().
Add functions to dump contents of index maps.

Adds dump_as_array() and dump_as_list() methods to map classes that take a fd
and dump the contents of the index maps to disk. I am not sure whether thats
the right interface, but here it is. We can always change it later.
There is a new osmium_index program in the example directory, that allows
looking up elements in these indexes and dumping them in readable format.
osmium_toogr now dumps its location index to disk.
Add new typed_mmap helper class.

This is a helper class for working with memory mapped files and
anonymous shared memory. It wraps the necessary system calls
adding:
- error checking: all functions throw exceptions where needed
- internal casts and size calculations allow use with user defined
  type T instead of void*

The MmapAnon and MmapFile index map classes have been updated to use these
wrappers.