Accounting entries are deprecated. Don't rewrite them to the wallet
database when re-ordering transactions.
Also remove unused function.
Partial backport of Core PR13825
https://github.com/bitcoin/bitcoin/pull/13825/commits/3f248a873f941cbcc4d0c24021edcd11e927da98
https://github.com/bitcoin/bitcoin/pull/13825/commits/f992f7fa3eb1438cb01d35af699954ef6f79438a
Depends on D5413