tests: fix test-runner for osx. Closes ##4708

Use the more portable $$ rather than $BASHPID
Merge pull request #4710

9322f1a tests: fix test-runner for osx. Closes ##4708 (Cory Fields)
Merge pull request #4707

a65668d build : fix CPPFLAGS for libbitcoin_cli (randy-waterhouse)