Raise a ValueError if Graph.items is called with a recursive collection

Fixes a bug where, if a graph contains a closed/self-referencing chain
of rdf:rest statements, Graph.items would be caught in an endless loop.