Parse commands based on their type.

This allows adding of new commands without any changes to command
parsing and generation code.
Add simple test suite.
Fix detection of monitoring outputs.
Cleanup configuration options parsing.
Make --backup function use generic command types.
Change internal cmd numbers.
Rename --vo-route parameter to --vo-input.
Improve documentation.
Add full support for monitoring video outputs.
RELEASE: 0.4