fix key length checking

according to the kafka protocol, a length of -1 indicates null
fixed consumer MessageSet bug