CLI: parser optimization

Use the new optimize() mechanism created for autocomplete also for
actual command parsing. OR all command patterns into a single parse
tree that is then optimized. That tree is what the CLI uses to parse
commands now.

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>
Merge pull request #52 from gontanon/optimize

CLI: parser optimization