*: lock the in using files; do not purge locked the wal files

Fix #1659