Restore rich completion

Adds support for #130.

Completion.getHeading() is not used, so can be removed (and added later as a separate PR).

Passes all existing tests, will try to exercise it with real project soon