Make autocompletion work across files again (with good performance now)

* thanks to Tyler for finding TypeScript.getReferencedFiles() (which
made this somewhat trivial)