Implement CSV downloads of search results

Fixes #120.

Moves search/filter logic called by find_societies into a function. find_societies could be converted to be a GET API using similar technnique.