Make streaming friendly

The memory usage of the input was massive since it was holding the whole input,
the whole XML parse tree and the whole table which was about to be written.

Now we only have the current row in memory.