all the rest of the generic tcp socket goop
change arg syntax for chunks to be total size, internally is capacity
adding in more chunk logic and cleanup
Merge pull request #2 from telehash/master

resync with telehash:master (15/11/14)