Initial version of coinbase checking funciton for stratum pool

In stratum pool mining mode, the pool sends mining_notify message to distribute job, however, to reduce bandwidth usage, there is no transaction list included in the message, the miner would have to ask for it explicitly by sending a get_transactions message if desired, that in effect loses the bandwidth saving of stratum protocol, which actually is the essence.

By adding a coinbase checking function, we can possibly obsolete the necessary of get_transactions message during most circumstance:
    1. We ensure this is a valid BTC coinbase for btc, so reduce the possibility of pool stealing power for other kind of work;
    2. We check amount and to-address by going through the whole payout list, so reduce the possibility of pool stealing the coins mined;
    3. We can even specify the percent regards how much pool can gain from this mining job, so reduce the possibility of pool transferring (part of) coins mined to unknown address;
    4. This also creates possibility for other kind of collaborative mode between pool and miners, which we are actually looking on...

The coinbase checking can not totally replace get_transactions message, but combined with other human actions it can give miners‘ enough confidence to trust a pool.

The usage is pretty straightforward: input --coinbase-perc argument with --coinbase-addr, e.g.: --coinbase-addr='XXXX' --coinbase-perc='=1', or --coinbase-perc='>0.99', or --coinbase-perc='<0.05', etc, the command will check the addr 'XXXX' get corresponding percent of the whole benefit, else it would output an error message.

Signed-off-by: Huang Le <4tarhl@gmail.com>
Besides the flexibility for users, we do have cases for '=' and '<'. '=' is usual, for the pool receives all rewards in the coinbase before it make payment to miners later; '<' is for a special case we are thinking, in which several miners who are running quite huge a farm and connect into a pool hosted for this farm, they wanna be sure that the pool receives say less then 1 percent of rewards.

The latter case would be better addressed by letting the check supports a list of address and still uses '>' or '=' to do the comparison, but that would complicate things so '<' comes into as a provisional/crude alternative...