exit with errorcode 1 when a list error occurs

Fixes #2817.  This is now more consistent with Homebrew's
`list`, though not completely, because Homebrew's `list`
refuses to give any output when there is an invalid Formula
argument.  Our `list` stumbles forward instead, giving such
output as is possible based on valid args, but still exiting
with error when invalid args are seen.
Merge pull request #2820 from rolandwalker/exit_code_on_list_fail

exit with errorcode 1 when a list error occurs