fetch: fix deadlock when cleaning up lockfiles in async signals