Add collapsing of search terms in results.

The search terms will group into HPO and MeSH terms now.