shell: refactor default shell command handling

before, we actually duplicated code for handling of shell commands
supplied to shell_init and those hardcoded by MODULE_SHELL_COMMANDS.

This patch refactors shell.c find_handler and print_help so there's
no duplicated code.