fixed latest merge from master

- unittest was broken
- refactored new TcpSocket constructor

please take care and run "make test" before pushing online and keep coding discipline (cryptic variables, as const as possible, return value checking)
When using posix API it is useful to google jsut for "posix <functionname>" to get a detailed api description with return values etc.