Also reduce API exposure and use standard library more - and fix bugs I previously introduces in mongo.
This makes almost no changes to source, but touches every almost file. Also fixes error in gremlin test code.