Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
It does let you tack a `Valid() bool` method on, though, so it can help even if the compiler doesn't assist you directly.

I miss enums too ;).