Refactor out graph algorithms and build Berkeley Graph Database

This PR refactors graph algorithms into internal ops so that the implementation isn't duplicated for different graph backends.  It also implements a Berkeley DB implementation of the graph database and sets it to be the default implementation.