Support RDF Thrift as an input format

Supported for both triples and quads.

Refactors input format tests to prepare test data using OutputStream
instead of Writer.