Fix LedgerDB OnDisk tests
After the fix introduced in #3827 the LedgerDB OnDisk tests started failing because the tables in the backing store did not contain the values of the initial ledger state. In addition, the implementation of the Snap command in the system under test did not flush before taking a snapshot. Even when this was corrected, function `takeSnapshot` would not take a snapshot when there was a state in the changelog. This problem was caused by `ledgerDbOldest` returning `Origin` even though there was a more recent ledger state.