Make scoped_pipe able to read multiples of 1024 bytes

We were incorrectly handling the return pattern of:
  read(...) = 1024
  read(...) = 1024
  read(...) = -1 (EWOULDBLOCK)

This means we have data, not no data.  We were catching this in
log_indexer when it would get a digets of exactly 2048 bytes long.

Change-Id: I848512357ddb8ca48e16f9d5ed005d9181ef6691
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/util/scoped_pipe.cc b/aos/util/scoped_pipe.cc
index e2e0ca5..d64fad1 100644
--- a/aos/util/scoped_pipe.cc
+++ b/aos/util/scoped_pipe.cc
@@ -55,8 +55,8 @@
         read(fd(), buffer->data() + buffer->size() - kBufferSize, kBufferSize);
     if (result == -1) {
       if (errno == EAGAIN || errno == EWOULDBLOCK) {
-        buffer->resize(original_size);
-        return 0;
+        buffer->resize(original_size + read_bytes);
+        return read_bytes;
       }
       PLOG(FATAL) << "Error on reading pipe.";
     } else if (result < kBufferSize) {