Add command infrastructure

This PR introduces an initial version of the command infrasructure.
Targets #188.

Please let me know if and how the documentation is not sufficient.
If you look at the function definition, you'll notice that there is a lot of documentation, which I didn't want in the struct.