add cache_dir

Add an argument to `ParserGenerator` that specifies where the cache should be stored

TODO:
 - tests
 - docs


At this point I'm mostly looking for feedback on whether this feture is worth adding. It's useful for me because computing the tables takes a long time (~5min) and functionality allows me to keep the tables between reboots.