Rename longpoll threads according to what pool they're associated with

Cherrypicked from f3ce5777a270caa2b672396a61040c321eda310d

Conflicts:
	miner.c
convert sleep(const) to nmsleep()

Conflicts:
	driver-bitforce.c
	miner.c
Add notice for when network diff is changed.
Add new best share info to verbose logging.

Conflicts:
	miner.c
Differentiate socket closed from socket error in recv_line.