Add spec for exitstatus for unrecognized tasks
Set THOR_DEBUG flag

Enable debug flag so errors from Thor are getting raised. This enables
us to rescue them, inform the user and exit with a failing exit code.
Rescue thor errors

Since debug flag is set thor raises errors. Rescue the error and print
the message to the ui. Then exit with a failing exit code.
When a command is unknown exit with 15

Treat unknown command the same as invalid option.
Exit code 15 is used when an option is invalid. Tread unk
Merge pull request #2478 from pjvds/fail_for_unknown_commands

Fix succeeding error code on Thor failures

Commits were cherry-picked into a new branch and then merged into 1-3-stable,
because the original source branch was out of date.

Fixes #2478