Change StateCache internal map to use TrieMap which supports O(1) snapshot creation instead of using our own implementation which copies the entire map on each snapshot
Fix checkstyle errors