Handle export in JSON and CSV readers + code cleanup

Refer to http://eswiki.splunk.com/Java_ResultsReaderMatrix. Some of the
code cleanup changes were motivated by code review feedbacks. This
change does not include integration with Fred's test code change, which
will be done next as a seperate commit.