(#1869) - performance improvements for idb.get

Also includes some generic performance
improvements for merge.traverseRevTree and
utils.isDeleted.