Provide #getFileMetadata() in EditorContext
JS plugin: change ASTManager cache behavior to avoid stale results

* Do not use cached AST if file path differs, or is unknown.
* Add/Update ASTManager unit tests
* Fix async race condition in some FinderTests