Add thread specific cache of type info

Reduces the number of locks necessary to check of a user defined type
conversion should be scanned for / applied.