[NaCl SDK] nacl_io: fix memory curruption in TCP fifo.

Corruption was occuring on Write() to a FIFO where the
write pointer was already wrapped (avail_ + tail_ > size).

Update fifo tests to test for this case.

Add a test for sending a large amount of data over TCP
(greater than FIFO length) which was triggering this bug.

R=binji@chromium.org, noelallen@chromium.org

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

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