added test and code for TcpStream
deleted the broken TcpStream tests and fixed the connected flag in the
tcpstream so tha connections are only attempted once