Clean up mining
Now, mining is done in a go thread which terminates when mining finishes. Doesn't use channels any more, has 3 variables: a bool, a lock, and an int. The bool indicates whether or not miners are running. The int is how many threads are mining, it'll pick the max according based on a global variable which can be changed with user input.
If you so desire, we can change threads to an environment variable, but I'd rather not do it right now. Overall I think this makes things a lot cleaner.