batch-loading vertex cache refactoring and optimizations

I deduplicated some code in the vertex caching part of the graph batch loader without changing the VertexCache interface.  I also optimized the vertex cache implementations to eliminate redundant work on commit. When loading the SNAP Amazon dataset for graphlab with StringIDVertexCache and 10k batch size, this cut walltime time from 25 to slightly under 20 minutes. 

The test suite exercises all three concrete vertex cache implementations.  They pass their JUnit tests on my box.  However, I've only used the StringIDVertexCache implementation with a nontrivial dataset (SNAP Amazon).  The others are untested besides the unit suite.  If you don't like the refactoring which I sort of hurried through, then you might want to consider just a0cf0f1 alone, which is a single-file optimization commit that attempts no refactoring.  I could make another PR for just that commit.