Make inexact queries much more heuristic

For example, exact matches with respect to case are always at the top.
Next come prefix matches with respect to case, then case insensitive
exact matches, then case insensitive prefix matches, then substring
matches.  Sorting of results weights exactitude higher than the number
of times something was seen.  Sorting is done after databases are
merged.

With these changes, the queries for "map" and "Map", or "bimap" and
"Bimap", return what you'd expect to see first.  Otherwise, it's rather
hard to search for Map, since there are were many case insensitive
identifiers that have map as a substring.  Basically you couldn't find
it without specify the package or the module.