Deal with empty facets queries on cloudsearch (re #1366)

(complete with unit test).