Cache Aho-Corasick dictionary objects

Caches cdata objects at the module level. This increases performance
by over 100% (dictionary creation is expensive).