net/tls: Wait for output to be sent when shutting down
net/tls: Wait for output to be sent when shutting down

Not doing so can lead to use-after-free: while the reactor checks if
the file descriptor is writtable, the posix_data_sink_impl which owns
the packet is destroyed, and the reactor later accesses a freed
packet.

Signed-off-by: Duarte Nunes <a60e8b7496f7715d71354fe4c06dd24017025bf1@scylladb.com>

cloudius-systems/seastar,scylladb/seastar,avikivity/seastar,avikivity/seastar,cloudius-systems/seastar,scylladb/seastar,avikivity/seastar,syuu1228/seastar,syuu1228/seastar,cloudius-systems/seastar,dreamsxin/seastar,syuu1228/seastar,dreamsxin/seastar,dreamsxin/seastar,scylladb/seastar