Fix compile error with assertions.
Virtualize the command interface.

Now there is only one instance of each command implementation, not one for each channel (serial and SD card).
This reduces program size in exchange for a small slowdown.