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