Implement recvfrom, other minor networking improvements

Enough to get some DNS-using example programs to run more often,
though I still think not correctly.