Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
I'm getting less and less sure we ever need to do anything other than just create a backup info record, just once, with a random UUID id. What's the purpose here?

(docstrings would probably help me follow)