Improve ordering of Nodes

When ordering, unbound variables must come first, then blank nodes,
followed by IRIs and finally literals.[1]

This also fixes a Py3-incompatibility: NoneType is not comparable in
Py3.[2]

[1] http://www.w3.org/TR/2012/PR-sparql11-query-20121108/#modOrderBy
[2] file:///usr/share/doc/python3.2-doc/html/whatsnew/3.0.html#ordering-comparisons
Merge pull request #12 from uholzer/py3-None-comp

Ordering of Nodes and py3 compat