Fix bug in CsvInputFormat resulting from changing UserCodeWrapper

configure() is called twice on input formats because of statistics
generation. CsvInputFormat did not handle this gracefully.

Also change TPCHQuery3WithUnionITCase to TestBase2.