Add command name prefix matching

A command can now be invoked with a prefix of its own name, assuming that
prefix is unambiguous (ie it isn't also a prefix of any sibling command's
name).
Reset root command lists in testing

This fixes some issues that appear when testing prefix invocations. Since the
root command lists weren't being cleared, the list would persist between
tests, so there would be multiple instances of each command. Then, if you
tried to match a prefix of one of those commands, you'd get two matches (one
for each instance) and the command would fail.

Resetting the root command lists prevents them from persisting between tests,
resolving this issue.
Add basic test for prefix matching