tweaks to headless.Main to make it testable

- never call System.exit
- use Console.out/err, not System.out/err, so both output
  streams can easily be redirected for testing purposes
add some basic testing for headless.Main

should have done this long ago!
Merge pull request #596 from NetLogo/headless-main-tests

add some basic testing for headless.Main