Drastically reduce "query" concept.

"Queries" no longer exist. It's replaced by query repositories, which
offer search functionality. The responsibility of translating user
intent into query now falls to the web api controllers. This reduces the
overall code complexity by a significant amount.