Refactor Repository return value to Result mapping.

Json/CSV streaming can also be implicitly transformed to
Streaming results. Also adds dependency for superCSV.
Preliminary implementation of Json->Csv for query and download
requests.
Fixes bug in CSV output.
Uses SuperCSV encoder to ensure proper handling of Strings.