tests of db.isStaged, db.stageEmail, db.gotVerificationSecret, and db.emailKnown. also add some documentation in db.js for various apis