model the digests file and allow updating and saving changes

This adds formal modeling of the digests file.  It encapsulates
reading and updating the file and provides a nice hash-like api
for reading and writing values.

This will be used by the upcoming `digest` subcommand when it
digests asset files and updates the digest file.