GUAC-746: Log connection ID after NULL check.
GUAC-746: Close socket file descriptor automatically upon free. Add free handler to nested sockets while we're at it (fixes GUAC-354).