sercmd: read the rest from socket if message was too big for rcv buffer

- reported by Savolainen Dmitri, FS#422

(cherry picked from commit 5bc9e43eb6827220468f526c3df9d4c775311e51)
sercmd: refactored reading the rest from socket on reply too long

- patch by by Savolainen Dmitri, FS#422

(cherry picked from commit fe9c519ca6ef6625f0b0d9c7027158641c636087)