Basic caching
Group multiple analysis invocations
Only add GROUP BY when required
Merge pull request #2 from maurer/typecache

Speed optimization for holmes.