convert a keyword search into a faceted term search

* provided we can convert the search keyword into an authoritative facet term
* if more than one facet is matched, we'll use the first one with the highest priority configured

related to these pull request: https://github.com/GigaOM/gigaom/pull/5114 and https://github.com/misterbisson/scriblio-authority/pull/76

see https://github.com/GigaOM/legacy-pro/issues/3995
Seeing all the foreaches hurts. See question in https://github.com/misterbisson/scriblio/pull/49#discussion_r16694839 .

Reason: I'd love to just do a `usort()` here and avoid the nested loops.