cli: Check pid file before random_delay

If there is another process running now, there is no need to wait, especially
without pidfile, so create such file immediately, then wait if needed.
19 jobs for feature/check-pid-before-delay in 0 seconds
latest