Support iptotallen=0x0000 in TSO case.

This also adds some more sanity checks to stay within the captured buffer.
Ensure line buffered output even in pipes
Merge branch 'topic-flush' of github.com:ecki/tls-hello-dump into dev