Return size hint in ReadRecordLayer
Return size hint in ReadRecordLayer

Summary:
ReadRecordLayer currently returns an `Optional<Param>` when reading records
from the wire. `none` is returned if we could not read a full record due to
missing data.

This diff changes the return type to a `ReadResult`, which acts like an
`Optional`, but contains an additional "size hint" that indicates a minimum
number of bytes needed in order to make further progress in consuming the
record.

Consuming the record involves (1) reading the outer record header, containing
the full record size, and (2) reading the remaining record content. If we
could not fully read the header, the size hint indicates how many bytes are
needed to read the complete header. If we could not fully read the body, the
size hint indicates the number of remaining bytes needed before we are able
to process the record.

The intention of this change is to later make it possible to have AsyncFizzBase
read data from the kernel on record aligned boundaries. This is necessary to
switch over to kTLS.

Reviewed By: reanimus

Differential Revision: D22988652

fbshipit-source-id: 701da60e6dd6a4132b055cfb475e413b080392ed

facebookincubator/mvfst,facebookincubator/mvfst,facebookincubator/mvfst,facebookincubator/mvfst,facebookincubator/mvfst