Add metadata for state backups.

This is part of my effort to split up the work for backups into a few smaller patches.
i don't think a nil timestamp should be passed here, use a `time.Time`, which has a helper `isZero()` function already for determining invalid timestamp values.