Refactor to use a disk-persistent cache.

This should speed up future rebuilds more than the old in-memory cache, as it
will also cache the preprocessed AST and only re-read/parse files that were
modified. The speed gain should be even greater on compile-to-js languages as
recompilation of unmodified files will be completely skipped. Fixes #83.

I've noticed a small speed loss on the first build probably due to stringifying/writing cache to disk, but after that every rebuild is faster than before.