Streaming RDF export

With these changes the RDF export becomes streaming:
- the data is not handled twice;
- the triples are not loaded in memory as a whole, but row by row;
- the output generation starts while reading the rows.

Fixes issue #101
Moving these imports when they're unchanged adds noise to the diff