Add data structure reconciler and tests

Cleans up auxiliary data structures in case old data stuck around due to
a crash, etc.