Encapsulate jcli functionality into a JCLI class. Also, linux-style exit codes.

Seperating the argument parsing and config file loading logic from the
main program logic will make writing tests easier. In theory.

Looks like I accidentally expanded this PR. Next time I'll use feature branches.

Now including: linux-style exit codes and printing to stderr.