Fix advanced searches of multiple fields

Commit message for ee572c7 explains it fairly thoroughly:

> Prevent multiple calls to #query
>
> Iterating over multiple TermSearch objects and separately applying them to
> a search causes multiple calls to #query, of which only the last will make
> it to elastic search.
>
> This change re-structures things so a single #query is called and each
> TermSearch adds a must-match clause to it.