Cache results of read_ast call

In order to speed up linting a project, we can cache the results of read_ast between calls. In a real world repo that reads over 800 files, that change more than halves the time (50s vs 2:15).

The test suite also gets a nice boost as a result.