base: Don't kill stream buffer callback when nothing has been consumed.
shell: Fix Docker 'attach' header parsing.

* Return zero when the buffer isn't big enough yet.  Returning
  'undefined' means that everything was consumed.  (I have not
  actually observed this; the first message always seems to include
  the whole header.)

* Handle the return value of view.process.  It might not consume
  everything.

  We can not simply not call view.process and "return pos+4" to let
  the channel deal with this.  A buffer callback is required to
  consume as much as it can.