Generalise performSearch to allow different query types.

This will allow us to avoid code duplication when doing "msearch"
queries.
Add msearch functionality.

This also generalises parseSearch into parseAURSearch, as both the
"search" and "msearch" queries both get back pretty much the same data
format, so it doesn't make sense to duplicate code.
Merge branch 'api'