Re-write of CLI command processing.

The CLI has been re-implemented so that there are commands which can have sub-commands and/or formats. The commands can be connected together as desired and a format is added where there are arguments to process that will ultimately lead to command execution.

This allows commands to also easily be put in multiple places. For example, "lock entity" and "entity lock" are both available and map to the same implementation with no duplication.

Hopefully this is an easier to maintain implementation, and easier to tweak/improve as there is less duplication.

I have tested as much as I can to ensure everything is wired up properly still, but I can't promise I haven't introduced bugs in the translation.