Handle the case that RFP negotiation message arrived early.

The RFP server will send RFP negotiation message to client once
connection is setup. In some case this message may arrive before
it retrieve the response for WebSocket upgrade. Then it will cause
issues for the following RFP verification as no more RFP negotiation
initial message will arrive.
This commit will cache the data if the above case happened. Defined
a new function _recv() which will read from the cached buff if it has
data, otherwise read from the socket.

Change-Id: Icc3f312156b8d2cee6e0500218edf5d8b991ade7
Closes-Bug: #1691185
2 files changed