Issue #103: sort mempool

Make the mempool transactions sort by dependency
Change history to also use the same dependency sort (toposort)
Change get_mempool_txs to return transactions, not just their hashes
Merge pull request #104 from jimmysong/103

Issue #103: sort mempool