Make completion more efficient
This change contains no "functional / behavioural" change to the completion stuff. Changes are as follows:
- Use
std::vector
forfiltered
andprefilter
in the model. - Remove dead functions
- No "prepends", just
push_back
and reverse the vector later - No need to do
upper_bound
when we are adding items to the model initially. Just add everything and sort it afterwards. - Minor optimizations to the matching / filtering code.