Rethrow original cause if recovery throws error

Also, made rollback a bit more robust, so that it will reconnect if
there is an error.
Extracted another helper method

les duplicated code between runSegment() and retry()
Actually use the --header option
Log nested exception when handleException fails
Added a test for closed connection handling
merge ScottDugas: Actually use the --header option for csv

Merge pull request #104 from ScottDugas/sql-layer-client-tools/csv-header-loaded
https://github.com/FoundationDB/sql-layer-client-tools/pull/104
A bit of refactoring/commenting on test

This was temporarily failing on my machine because my sql layer was running really slow
merge ScottDugas: Fix handling of EOFException

Merge pull request #103 from ScottDugas/sql-layer-client-tools/eofexception
https://github.com/FoundationDB/sql-layer-client-tools/pull/103