[NaCl SDK] nacl_io: fix permissions on accepted sockets.

Accepted sockets were not being marks as writable (O_RDWR).
Also, calls to send and recv where not checking open flags
so this was not being picked up by our tests.  This fixes
both issues and increases test coverage.

R=binji@chromium.org

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

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