fixed sparql parser bug with pnames followed by a dot

Previously, bugs would occur when triple-patterne did not have
whitespace between a pname and the terminating dot:

?s ?p foaf:knows.

would parse into a uriref of "http://xmlns.com/foaf/0.1/knows."

The optional clause of the PN_LOCAL production was in the wrong place,
fixing it was non-trivial, since pyparsing cannot backtrack.

I replaced the whole production with a regex, parsing pnames should now
also be much faster (not that it matters greatly)

Thanks to balkian on irc for spotting!
back to old-style string-formatting
minor rdf2dot whitespace fix
rdflib.compare fix, md5 sum was never reinitialised, re: #297
Added a TriG parser

Also cleaned up N3 parser a bit, and added a Turtle flag, so that
special N3 features are not accepted when parsing as turtle.

Fixes #273 - now we should add some tests :)
clean up turtle parser a bit, fix repeat subjects in trig parser

this fixes the bug reporting in #317

also removed redundant trig test.