Moves getDegree() support into kernel.

 o Moves getDegree and getRelationshipTypes into the kernel implementation.
 o Introduces SingleThreadedHashMap, a hashmap lacking certain multi-threading checks.