Simplify the Write() for TCP based connections

Simplify the code path by using io.Copy to handle partial writes. Allocate `l` large enough to avoid a re-allocation. Potential short write fix.
Merge pull request #66 from armon/patch-1

Simplify the Write() for TCP based connections