Mojo: Change data pipe API to take # bytes instead of # elements.

I discovered a whole bunch of bugs in the existing (totally untested)
code. I also noted some refactoring that I want to do urgently (some of
which help with those bugs). I noted them with "TODO" and "FIXME" (the
latter so that it's easy for me to grep) as things to be fixed ASAP.

I wanted to keep this change to (nearly) only the straightforward
conversion of the API. The only bugs fixed are that the checks to
handle all-or-none mode in two-phase write/read were backwards.

R=sky@chromium.org, darin@chromium.org

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

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