[devtools] Use a trap to cleanup bitcoind instead of a background process
Summary:
This improves code locality, making it easier to reason about.
This also removes an unnecessary looping sleep.
Test Plan:
./bitcoind-exit-on-log.sh --grep 'New outbound peer connected' --params "-datadir=/home/jasonbcox/.bitcoin" ps aux | grep bitcoind
Verify no dangling processes
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6378