Add documentation to value class.
Factor segment header into separate structure.

This unifies and facilitates reading segment meta data from a serialized
representation.
Fix potential misuse of initializer lists.
Make segment accesss interface more idiomatic.