java: Avoid race condition between disconnect probe thread and disconnect function

There is a chance that the disconnect function locks the socketMutex and
tires to join the disconnect probe thread while the disconnect probe thread
is about to lock the socketMutex. This results in a dead lock.

Avoid this problem by not locking the socketMutex in the disconnect probe
thread. This locking was not necessary as the disconnect probe thread only
exists while the socket is valid.

Also add a socketSendMutex to the socket for serializing send calls, which was
realized by the socketMutex before.