Fix several problems with Jump to Definition API

Fix bug #7065/#5773 and other several problems with the Jump to Definition extensibility API:

- JS impl would always crash on non-JS code, blocking any other provider from responding
- Provider was not called with the args the docs described
- Other errors in docs