qemu_log_lock/unlock now preserves the qemu_logfile handle.