test: Speed up interface_ipc_mining.py and fix large timeout-factor bug

bitcoin/bitcoin: PR #36924

The review is inconclusive; no findings were published.

Coverage details