merge latest code of history.cpp to balance.cpp

this enables balance of multiple addresses, as well as json
format response as requested on:
https://github.com/spesmilo/sx/issues/34

$ sx balance 1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P 182osbPxCo88oaSX4ReJwUr9uAcchmJVaL
Address: 1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P
  Paid balance:    238109137989
  Pending balance: 238109143989
  Total received:  614505313318

Address: 182osbPxCo88oaSX4ReJwUr9uAcchmJVaL
  Paid balance:    103383700
  Pending balance: 103383700
  Total received:  124945670

$ sx balance -j 1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P 182osbPxCo88oaSX4ReJwUr9uAcchmJVaL
[
{
  "address": "1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P",
  "paid":  "238109137989",
  "pending":  "238109143989",
  "received":  "614505313318"
},
{
  "address": "182osbPxCo88oaSX4ReJwUr9uAcchmJVaL",
  "paid":  "103383700",
  "pending":  "103383700",
  "received":  "124945670"
}
]

history.cpp and balance.cpp files are almost identical, and they should
be merged to a single file to avoid code duplication
also functions json_history_fetched and history_fetched should be merged
if fetch-transaction command doesn't find tx in blockchain then fall back to tx mempool.
stealth commands.
include obelisk to make sx easy to install.
modify stealth tools to use stealth addresses.
call secret-to-wif automatically to generate the private key.
Fix problem in set-input (and make its stdin/cliarg behaviour consistent with other sx commands)

Set-input is currently broken, or at least help message is invalid. The help message claims set-input takes 3 arguments, but sx-set-input actually takes only two.

Previously sx-set-input required signature on stdin. New behavior is for signature to be specified on command line, and transaction to be signed can be optionally specified on stdin if command line arg is single dash. This is consistent with behavior of other sx commands that take a transaction.

With this fix, sx-set-input takes 3 arguments instead of two, and the sx.py help set-input help message is correct.
The sx.py help message is also expanded to make it easier to follow the example.

This fixes issue https://github.com/spesmilo/sx/issues/21

$ ~/src/sx-git/src$ ./sx-set-input txfile.txt 2 otherfile.txt
Usage: set-input FILENAME N
thomas@debian:~/src/sx-git/src$ sx help set-input
Usage: sx set-input FILENAME INDEX PREVOUT_SCRIPT
Set a transaction input.
thomas@debian:~/src/sx-git/src$