Parses a single key id from value, accepting an optional 0x prefix.
0x
Hexadecimal is attempted first, then decimal.
the parsed key id, or null when value is empty or malformed.
null