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.
Merge branch 'master' into optIOMemManyGraphs

Conflicts:
	rdflib/plugins/memory.py
optimization for IOmemory's len function

no need to iterate over the set anymore.
Merge pull request #318 from RDFLib/optIOMemManyGraphs

quad serializations take a long time