datrie: doesn't seem to work with ZODB (python exits with 245 on load)
Frontend: make some IDs more distinguishable
Frontend: Change search algo to prefer substring matches,

sort lexicographic inside groups of same rating
Also, remove trie stuff
Move search algo from frontend to lhs.db ; add lhs.util
Refine search algo a bit