Rename IsConfirmed to IsTrusted to better match the intended behavior.

This doesn't change the functionality at all.
Add raw transaction hex to `gettransaction` wallet RPC

This allows getting raw transaction data from the wallet even if the
transaction is no longer in the blockchain / mempool (for example if it
got orphaned due to malleability abuse).
Merge pull request #3668

3a1c20b Add raw transaction hex to `gettransaction` wallet RPC (Wladimir J. van der Laan)
Merge pull request #3662

0542619 Rename IsConfirmed to IsTrusted to better match the intended behavior. (Gregory Maxwell)
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.
Handle "conflicted" transactions properly

Extend CMerkleTx::GetDepthInMainChain with the concept of
a "conflicted" transaction-- a transaction generated by the wallet
that is not in the main chain or in the mempool, and, therefore,
will likely never be confirmed.

GetDepthInMainChain() now returns -1 for conflicted transactions
(0 for unconfirmed-but-in-the-mempool, and >1 for confirmed).

This makes getbalance, getbalance '*', and listunspent all agree when there are
mutated transactions in the wallet.

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.