move txn & dbi ctor to JS side.
renew a non-readonly txn.
fix data type issue.