Sort non-scope autocompletion results by locality
To present more relevant results at the top of the list, sort them in
the following order:
local variables
tags from current file
workspace tags
global tags
and alphabetically within a single group.
In addition, we need to remove duplicates from the list of displayed names.
Finally, since the entries are not sorted alphabetically, we need to call
SSM(sci, SCI_AUTOCSETORDER, SC_ORDER_CUSTOM, 0);
so Scintilla knows it shouldn't sort the list alphabetically.