refactor queries with lookupWithInitial helper
Add a function Util.lookupWithInitial
that returns a value in a map or sets a default value and returns the default value. Then use this to cleanup the implementation of various query managers so that we don't need to assert impossible cases. Also add a newtype wrapper for Models.ContentType
strings to be used in maps.