Add dbi.stat(txn) to return stat in db

It's useful to return the size of db, therefore, I add this function.