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.
Suggestion: The command type and the callback are directly related. Why not putting it into an own struct like so:

```C
struct {
enum { /* */ } type;
union { /* */ } func;
} callback;
```