Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
This will fail. updateStatusOp asserts DocExists, which it doesn't -- all asserts are checked before any op is applied.