debuglock: make the command more useful in non-interactive mode
The existing prompt mode simply release the lock immediately in non-interactive
mode. That is quite useless in the test so now the non-interactive mode simply
wait for a signal.
Differential Revision: https://phab.mercurial-scm.org/D12616