Minor: refactoring of VertexIdType.

Minor refactoring of VertexIdType. Fixed "if-else polymorphism" antipattern. Created getVertexCache implementation for each VertexIdType.