refactored tcp and udp connections into seperate files

Ignore-this: dafb8049263ed2636bfce6d4c6d4fe0f

Also started adding ACK for UDP connections.

darcs-hash:20131104195331-c21fe-b86bda07fa64252563882da09f73ee67e230620a