partially address port/handler/socket lifetime issues

The Erlang ports used by gen_utp to represent uTP sockets are backed by C++
objects that contain uTP sockets and UDP sockets. This commit partially
addresses issues related to the lifetimes of these objects, e.g. addressing
a case where a port was getting closed while there was still uTP traffic on
the underlying UDP socket, but several such issues still remain.