Use source index to get completions from current package

NOTE: This could use some review as I'm not fully aware of the most 'idiomatic' ways of generating R objects / lists from C++ code.

This PR generates autocompletions from the source index when working on a package project.
Just to double check -- does this effectively check that the R script is within the `R/` subdirectory of the package directory? Would it make sense to check for some other directories as well, e.g. `inst/` `tests/`?