Right now we directly call input-stream.read in three places:
- impl AsyncRead for TcpStream
- impl AsyncRead for &TcpStream
- impl AsyncRead for IncomingBody
In the first two impls we don't buffer and drop whatever doesn't fit into the buffer the user passed onto the floor.
In IncomingBody, a buffer is maintained for whatever the user doesn't take.
We should factor that buffer into a single BufferedInputStream in io::read, and reuse it in tcp and http.
Additionally, we can cache the Pollable for a given InputStream (as long as the fields are ordered so it gets dropped before its parent!) so we aren't subscribing and dropping that resource every time we wait for more input.