delphi: First try to fix callback dispatch stopping on disconnect

Callbacks could still get dispatched while the socket was already closed.
This resulted in a guaranteed timeout exception for getters called from
callback functions.

Try to use an additional mutex to serialize disconnection and callback
dispatch. But the problem is, this could deadlock due to an mutex ordering
problem with the socket mutex.
delphi: Fix race condition in socket closing on socket receive error

Avoid closing the wrong socket, if the disconnect callback is delayed
and a new socket has been opened in the meantime.
delphi: Handle socket error on send
delphi: Send a packet at least every 10sec to improve WIFI disconnect detection

Otherwise a callback based program might never detect WIFI disconnect.
c: Exit disconnect probe thread on socket send error
csharp: Exit disconnect probe thread on socket send error
java: Exit disconnect probe thread on socket send error
python: Exit disconnect probe thread on socket send error
ruby: Exit disconnect probe thread on socket send error
php: Fix callback dispatch stopping on disconnect

Callbacks could still get dispatched while the socket was already closed.
This resulted in a guaranteed timeout exception for getters called from
callback functions.

Drop callbacks if socket is closed.
php: Clear pending data on disconnect
delphi: Clear pending data on disconnect
php: Send a packet at least every 10sec to improve WIFI disconnect detection

Otherwise a callback based program might never detect WIFI disconnect.

Due to PHP's lack of threads this only works for programs that call the
IPConnection::dispatchCallbacks function.
Update changelogs