Add caching to Criterion for huge speed up for unordered_map with reused Criterion queries
+ Fix gcc warnings/errors