Fix bogus calculation in ModbusSocketFramer.checkFrame

I found out a bug in the checkFrame() logic: the packet size calculation is inconsistent with getFrame() and advanceFrame().