Improve performance and memory management in SPARQL/Turtle parsing and N-Triples serialization.