Add BIP0022 and BIP0023 getblocktemplate support

This pull requests adds full `BIP0022` and most of `BIP0023` support for the getblocktemplate RPC to btcd.  In particular it adds support for:

* BIP0022 Non-Optional Sections
* BIP0022 Long Polling
* BIP0023 Basic Pool Extensions
* BIP0023 Mutation `coinbase/append`
* BIP0023 Mutations `time`, `time/increment`, and `time/decrement`
* BIP0023 Mutation `transactions/add`
* BIP0023 Mutations `prevblock`, `coinbase`, and `generation`
* BIP0023 Block Proposals
For a couple of reasons.

First, the fees and sigop counts need to be referenced from the template.  If you range over .Transactions[1:], i will be 1 less than the actual transaction index which means you have to adjust the indices into the template as i-1.

Second, the returned index needs to be 1-based.  Since changing that to .Transactions[1:] would change i to be one less than it's actual position, and the index needs to be one based, you'd have to add index to the depends index as i+1.

Thus you'd end up with code like `txIndex[txHash] = int64(i+1)` and `Fee: template.fees[i-1]`.  In my opinion that is more error prone and less clear than simply ranging them all and skipping the coinbase.