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.
Merge pull request #36 from splunk/feature/results_reader_intermediate_json

Handle export in JSON and CSV readers + code cleanup + merged changes from child branch