update boundaries checking code to be slightly tigher
Add Hybi proposed generic subprotocol errors