[WIP] make ASTs cachable

Move this bock back to where it came from. The `FormaterAST` should go with it.