Optimize StringIDVertexCache

StringIDVertexCache's newTransaction() method performs a one-time
conversion from cached Vertex objects to their numerical IDs.
BatchGraph calls this method right after a graph commit call makes the
Vertex instances go stale.

To do the conversion, pre-patch newTransaction() code iterated over
every entry in the cache and used instanceof to find Vertex objects.
This patch introduces a set of entry keys updated since the last
newTransaction() call.  newTransaction() iterates over only the
updated entry set and then clears it.  Instead of BatchGraph w/ String
IDs doing an iteration on commit that is linear in the total number of
cached elements, the patched iteration is linear in the the elements
touched since the last transaction.
Refactored and optimized batch vertex caches impls

This commit pulls common batch-loading vertex cache code into
AbstractIDVertexCache and makes String and ObjectIDVertexCache extend
that abstract base class.  LongIDVertexCache uses Colt primitive
collections internally and is not amenable to sharing code with the
other Java collections-based implementations.

This commit also applies the optimization from
a0cf0f11d8c4eaf436493f742789142d741ac06e to Object and
LongIDVertexCache.  However, I've only tested it for
StringIDVertexCache.