Fix TCP echo example
[tcp] Simplify handling of tcp/connect objects
[tcp] Implement remaining TCP functions

Tests and cleanup still a TODO.