fix test_restore to work with history_free storages.
fix test_restore to work with history_free storages.

Copying records is a little delicate. We were creating a new storage
with a database, wch created object 0.  We were then copying records
from an older storage, which got transactions out of order.

In practice (I guess) one would first copy records from an old storage
into an *empty* storage and then open it. That's what the test now does.

newtdb/db