More features and fixes

* Separate listspends outputs into spendable/not spendable lists
* Adding commenting for documentation
* Instead of claiming locks for each tx in a block, call on_block in the wallet and txdb
* More complete implementation of multsignature P2SH payment and spending (needs more testing)
* Better support for mallated transactions (though not really complete yet. need to remove conflicting transactions from txdb)
* Code cleanup in various places
* Fix bug with block downloads