- Proper index locking on query.
- Sort-only queries properly return the total, even when the sort is filtered
Brought back the post-filter query path. The three paths largely optimize
around iterating over the smallest index. However, when we apply filters first
we need sort after the fact, so this approach only makes sense when
  a) we're dealing with a small number of values (configurable, but some
     testing with the previous, almost identical implementation, suggest that
     1000-5000 is best)
  b) one of the filters is considerably smaller than the sort length

The query that I happened to be looking at went from ~40ms to 80µs.