Bugfix: RPC: Use pthread_exit rather than returning from the RPC thread, to ensure tidyup gets called
RPC: Move socket tidyup code to its own function
RPC: Clean up mcast socket with tidyup_socket
RPC: Explicitly shutdown communication on client sockets to avoid them being held open by forked processes
Merge commit '1ac2181' into bfgminer

Conflicts:
	api.c
Bugfix: Set any listening sockets to close-on-exec/non-inheritable to avoid issues rebinding them on restart
Merge commit 'e6afb01' into bfgminer
Bugfix: Zero pool "Works"
Merge branch 'cg_merges_20131108a' into bfgminer
RPC: Return integer difficulties without decimal places
Merge commit '7de0ea3' into bfgminer