tweaks to DetachedXXX, ReferenceXXX, and some optimizations to GiraphInternalVertex.