* chore: adds memoize implementation for regexes.
Currently we create and allocate memory for every regex we compile, however there are cases where you compile the same regex over and over e.g. https://github.com/corazawaf/coraza-caddy/issues/76. Here we implement the memoize pattern to be able to reuse the regex and reduce the memory consumption.
* docs: adds comments to code.
* chore: simplify the memoize package by using sync.Map.
* feat: extends memoize to ahocorasick and allow impl for tinygo but not synced as no concurrency.
* tests: covers memoize_builders in tinygo.
* chore: fixes nosync for tinygo.
* docs: updates docs.
---------
Co-authored-by: Juan Pablo Tosso <jptosso@gmail.com>