HUE-1708 [search] Allow search results to be exported

Download as CSV or XLS.
Generalize a couple of methods that overlap.
Download in a different window.