Avoid potential conditions where mining is not restarted.
Separate out miner thread in preparation for own class.
Miner class.
Version bump.
Various small improvements.