(PDB-708) Structured fact storage

This series of commits turns on structured fact storage, but keeps backwards compatibility for now.
If we only had a bi-directional map, you wouldn't need these two fns.