Tweaks for the new R autocompletion

- Fix function name lookup for the scope tree (for eg. `x[["foo"]] <- function() { ... }`, the associated 'name' of the function is chosen as `x[["foo"]]` -- but note that the debugger is unable to debug such functions)
- Avoid duplicates for scoped variable completions
- Pop up autocompletions after `::`, `$`, `@`
- Some fixes for help popup / lookup (but most of that will be changing with the new UI)
- Some tweaks to file / path completion (continue showing completions after a `/` is inserted to complete a directory)
Ensure that autocompletion for e.g. `debug(stats::rno|` does not auto-insert parens
- Some miscellaneous code cleanup