Fix client-side failure when tag has no doclist
Add the server-side code for fetching searchResult counts
Show search results in the tree, like tags.

This is a bad implementation: it takes the slowest and most complex
part of our client-server API and makes it much slower and more complex.