SI-7995 completion imported vars and vals

Imported member vals and vars were always marked inaccessible, even
if referencing them at the location of the completion is valid in code.
The accessible flag is now set accordingly to the accessibility of the getter.

I am working on an equivalent PR for 2.11. The changes are fairly different, as the code has been modularized, and the format of the oracle is different. I'll submit it after this PR is merged.