Add a cache for module text and ast.parse result

Should speed up finding source locations for modules with many warnings