There are a few bugs in the current TFramedTransport.receiver caused by
merge mistakes and bad patches. This patch fixes the bugs and simplifies the logic so it is easier to reason about and prevent future issues.
THRIFT-2194: Fixed one bug with residual not being set THRIFT-2205: Reverted the above fix (by accident) and broke it further by including InputBufferUnderrunError in TFramedTransport (which is incorrect). This exception is only meant for TBufferedTransport which must use exceptions to signal when more data is needed.
This patch cleans up TFramedTransport.receiver by only using one hold-over buffer instead of two (previously frame and residual, now just the latter).
Verified that the current tests still pass.