This makes KeyValue objects smaller. 'equals' and 'hashCode' are now
implemented too. Key names are still used to recognise keys with special
meaning, but not for comparing keys anymore.
These two fields couldn't have an interesting value at the same time.
As we can no longer rely on a special value to distinguish between
what's the kind, the kind of the key is explicitly encoded in the two
most significative bits of the _flags field.
Extra nice thing: This removes the special values 'EVENT_NONE' and 'CHAR_NONE'.