Refactor interface loading, FinderCache and NameCache.
In order to support several home-units and several independent unit-databases, it's easier to explicitly pass UnitState, DynFlags, etc. to interface loading functions. This patch converts some functions using monads such as IfG or TcRnIf with implicit access to HscEnv to use IO instead and to pass them specific fields of HscEnv instead of an HscEnv value.
* Make NameCache the mutable one and replace NameCacheUpdater with it * Remove NameCache related code duplicated into haddock
* Make FinderCache mutable (similarly to NameCache)
As suggested by @alexbiehl, this patch replaces the always updated UniqSupply in NameCache with a fixed Char and use it with `uniqFromMask` to generate uniques. This required some refactoring because getting a new unique from the NameCache can't be done in pure code anymore, in particular not in an atomic update function for `atomicModifyIORef`. So we use an MVar instead to store the OrigNameCache field.
Use foldGet in getSymbolTable Implement @alexbiehl suggestion of using a foldGet function to avoid the creation of an intermediate list while reading the symbol table.