session/tcp/vcl: fixes and optimizations