Extracted graph element identities

Extracted creation of graph element identities in to
Util,IdentityProvider.
Refactored elements with identities to use IdentityProvider. More
generics than you can shake a stick at.