In order to override these later, the specific details of how the Read,
Write, Erase, and Exists functions interact with the actual database
file need to go into functions that are not templated.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19292 | core#19292]]