Optimization for IOMemory's __all_triples. fixes #318
Optimization for IOMemory's __all_triples. fixes #318

Adding a __contextTriples index allows us to efficiently look-up
all triples in one context at linear cost of the store's size.
This is a common operation for example during serialization.

The previous implementation got along without this index, but
serializing a dataset with a lot of graphs took quadratic time.

ssssam/rdflib,armandobs14/rdflib,armandobs14/rdflib,marma/rdflib,armandobs14/rdflib,marma/rdflib,RDFLib/rdflib,dbs/rdflib,dbs/rdflib,ssssam/rdflib,armandobs14/rdflib,ssssam/rdflib,marma/rdflib,yingerj/rdflib,yingerj/rdflib,avorio/rdflib,RDFLib/rdflib,yingerj/rdflib,dbs/rdflib,dbs/rdflib,RDFLib/rdflib,avorio/rdflib,yingerj/rdflib,RDFLib/rdflib,marma/rdflib,avorio/rdflib,ssssam/rdflib,avorio/rdflib