command: Factor command name matching out of command.c.
Making command parsing into a library will allow other code to use
the same functionality, which will be useful later in the lexer.
It also simplifies parsing command names and allows us to easily
add tests for command name parsing.
The new command name parsing code supports UTF-8. This is not useful yet,
because its only client does not feed it UTF-8 strings, but it will be
useful later when the rest of the lexer is rewritten, where it will gain
another client that does feed it UTF-8.