Stratum: Include pool number in send/recv protocol logging
Differentiate socket closed from socket error in recv_line.
Avoid applog under stratum_lock in recv_line.
Check for errors on stratum recv for any recv return value less than 1 and only parse the response if it's positive.

Conflicts:
	util.c
There should be no error response code with return value 0 in recv_line.

Conflicts:
	util.c
Create an OS specific sock_blocks function.
Avoid applog under stratum_lock in __stratum_send.

Conflicts:
	util.c
Use sock_blocks function for stratum send and receive.

Conflicts:
	util.c
Receive failures in recv_line should unconditionally fail.
Tree-Merge commit '03309a1' into bfgminer
Merge commit '1935865' into bfgminer
Bump version to 3.0.2
Bugfix: Use HTTP/1.1 compatible product token for User-Agent header
Merge commit '659d26d' into bfgminer