cli/application: use isinstance instead of hasattr to check whether the mixin is used
cli/completion: cleanup of switch grouping
cli/completion: various minor code cleanups. one fix for exclude switches.
cli/completion: code comments