function getDb(callback, next){
        database.getDb(function(err, db){
            if (err) {
                next(err);
            } else {
                try {
                    callback(db); // assume callback knows about 'next'
                } catch (e) {
                    err = new Error('Died in the repository; review server console');
                    err.stack = e.stack;
                    err.innerError = e;
                    next(err);
                }
            }
        });
    }
Get the mongodb database instance (db) and call 'callback' with that db.
Passes trappable errors along.
Private to this module

@param callback {function} the query function to execute
@param next {function} next(err, results)