Remove miner optimization

Nobody is using the miner besides testing, there's more efficient CPU miners out there and I don't think bitcoind needs more than a very basic miner for testing and maybe educational purposes.
This PR makes the miner code less efficient but clearer.