Make ObjectGraph itself an abstract type

Make ObjectGraph itself an abstract type with five abstract contract methods (plus the static create()), moving the implementation into a static inner class.