If requested, actually treat uncomfirmed change as being uncomfirmed

This commit strengthens 1bbca249b202c4802cc2c4d4de4a26e6392b4d92 by updating the CWalletTx::IsConfirmed() function.

If (bSpendZeroConfChange==false), then IsConfirmed() should actually treat unconfirmed change as being unconfirmed.
Merge pull request #3657

fdbc2b1 If requested, actually treat uncomfirmed change as being uncomfirmed (b6393ce9-d324-4fe1-996b-acf82dbc3d53)
Make qa/rpc-tests/ compatible with OSX

Reworked send.sh, so it works properly on my Mac (killall send.sh
doesn't work, because the process name is 'bash' not 'send.sh').
So now send.sh writes a .send.pid file, and invoking it as
send.sh -STOP (as the bitcoind -walletnotify) signals that PID.
Fix getbalance handling of spent, unconfirmed change

First: txnmall.sh is the start of an integration test for wallet handling of
mutated (malleable) transaction handling.

Second is a one-line change to IsConfirmed that adds a condition when
considering change outputs : only consider them confirmed if they are
in the memory pool (inspired by a comment sipa made yesterday).

This makes getbalance, getbalance '*', and listunspent all agree when run on the txnmall.sh test wallets. Before this fix, those three would return three different results.

Before:
 listunspent: one 49BTC output
 getbalance: 96 BTC (change counted twice)
 getbalance '*': 46 BTC (spends counted twice)

After: all agree, 49 BTC available to spend.