Add auto-completion to search prompt

I found this old local change of mine. It adds some auto-complete capability to the search, similar to "Show threads with labels", which I found quite handy.
It adds completion of labels as well as these keywords: from, to, after, date, before, date, limit, AND, OR, NOT.