add option to do batch graph writes (changes are committed only once
after N documents are written)
various modifications to support collapsing equal feature values to a vertex