Fix logic flaw in saving the new database file.

We must reopen the new database as the ("old", closed after rename()d)
'db_file' file descriptor, and place a lock on it again, to avoid the
situation where after a 'write' command, the database would have been
saved alright, but the lock would have been dropped with the closing of
the old db_file (because of the rename()), and the new db_file wouldn't
have a file lock. So someone could have opened the now saved database
file also for writing in parallel with the original kc instance.

This should probably get merged in the 2.3 branch.
Add regression test's leftovers to .gitignore
Update Changelog with the fixed db_file write/lock bug.