WIP: Add rdf serialization

still the old PR - do not merge yet.

Test notebook:

http://nbviewer.ipython.org/urls/dl.dropbox.com/s/t70r4dmhtky734b/RDFtestsuite.ipynb?create=1