Fixed of os::read/write to be POSIX compliant (handle 0, EINTR, and
partial reads/writes).

From: Ben Mahler <benjamin.mahler@gmail.com>
Review: https://reviews.apache.org/r/8694

git-svn-id: https://svn.apache.org/repos/asf/incubator/mesos/trunk@1440846 13f79535-47bb-0310-9956-ffa450edef68