transport: Handle read operations less strict.
The current implementation of a read operation does not allow that
the number of bytes received from a device exceeds the length a read
operation was started with.
A few commands can't be implemented with such a strict approach
because the number of received bytes is not known in advance. For
such commands, the device for example, returns the size of the
payload and, if available, the payload itself at one go. Therefore
the amount of data, and thus the length of a read operation, is not
known at the moment the read operation is started.
With this patch a read operation keeps exceeding bytes in the
internal buffer whereby they can be read with an additional read
operation. Thus it is possible to start a read operation just to
receive the size of the potential payload first. If no payload is
present, the read operation behaves as before. Otherwise the
exceeding payload will be kept in the internal buffer and can
afterwards be read with an additional read operation.