Merge bitcointools upstream changes and update callers.