overlay_mdp_send and overlay_mdp_recv should not change the socket blocking mode
Attempt to shutdown() socket gracefully before calling close()
Native-part of MDP JNI bindings
Add QoS and flags management
Special return code for "socket closed"

Blocking recv calls return a special return code (-2) for notifying the socket
is closed (this information is useful for MDP socket users).

This implementation is unsatisfactory: return code should instead be consistent
with recvfrom(), that is always returning the length of received data (0 for
socket closed).
Fix compiler warnings