Revert "Revert "recvfrom should set srcAddress for empty packets""

This reverts commit 94767318786fec526121498a4aba2f1dc07dd3c8.

recvfrom(2) may return 0 if:
 * packet received has zero length
 * the socket has performed orderly shutdown

Previous Libcore change 6e888e9 tried to handle the second case but
broke the first case and never fills in srcAddress for empty packets.

Added a condition to only fill in srcAddress if the sockaddr is an
InetSocketAddress.

Test: libcore.io.OsTest
Bug: 33483694
Bug: 27294715
Bug: 27233089
Change-Id: I50847bf813e20b02f5ac88d664e77622c28f3704
2 files changed