Fix bug on journal reconstruction
Fix recursive lock bug
Better checking on add new entries
Add TypeSwitch and TypeDictionary

* TypeSwitch implements a switch based on the type of the input. It is
  good for a short list of types, as it iterates over them rather than
  producing a dictionary.

* TypeDictionary is very similar to GenericCollection, except that it
  keeps a dictionary keyed by the root type. Users can still enumerate
  over a base type, getting every derived value in the dictionary, but
  leaf types are singular.