[NaCl SDK] nacl_io: Fix two issues with TCP sockets.

Firstly ensure that the event state is
updated on TCP read/write.  Without this the
socket says readable even after all the data
is read.

Secondly, make sure the RECVING flag is
cleared after a read completes so that next
one can be scheduled.

TEST=build and run libcurl in naclports
R=noelallen@chromium.org

Review URL: https://codereview.chromium.org/24364007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225728 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 225728