Support complex search queries

If the requested query is a proplist, then send it as json. This allows
for compound queries.