Code cleanup
Moved network code for cgminer to own file