LMDB rebase, lint, test unification

Hey @mavenlin, your LMDB layer is awesome! I rebased it on dev and did some minor cleanup (basically just to remove the data layer test duplication).