fix(loader): only keep hashes for the current loop iteration
(cherry picked from commit e12cfa567f)
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Whenever we run fs_stat() on a path, save this information in the loader
so it can be re-used.
- Loader.loadfile: Remove arguments `hash` as it is no longer needed.
- Loader.loader: Use _G.loadstring instead of Loader.load
This allows plugins to wrap loadstring to inspection and profiling
- factor out read file logic