parsers: extend options parser, support optional ID in key-value lists
The options parser accepts a colon separated list of key-value pairs, and
a special case where the first item is not a pair but a single word which
is an identifier. This lets users select a device driver, or input/output
format, or decoder.
Extend the options parser to also support an optional identifier as the
first item in a list of key-value pairs. Check the first item's keyword
for a caller specified literal. This change remains backwards compatible
(does not affect behaviour) when users don't pass the special keyword.