[[feature-stackdir]] Remove SHA-1 support.
[[feature-stackdir]] Add support for writing flags.

Flags are provided in the state as part of the literal info array.
Any key in the array not beginning with '_' is considered to be a
flag.  The corresponding values are ignored.
[[feature-stackdir]] Add support for reading flags.