processInputByte
Process a single incoming byte through the stream framing state machine.
Call this repeatedly with bytes from the transport (serial, TCP, etc). When a complete packet is decoded, onPacketReceived is invoked.
Malformed input never throws. On a broken frame the machine records a desync, rewinds to the hunting state, and resynchronizes on the next valid frame header — a corrupt frame costs one frame, not the connection.