fix regression in bin/shell.sh

it needs to still work when no model path is supplied, too
avoid sys.error unless error condition is truly fatal
fix some random unnecessary uses of java.lang.Integer
minor cleanup and update comment
extract methods to appease Scalastyle
Merge pull request #593 from NetLogo/avoid-boxing-ints

cleanups around java.lang.Integer and sys.error
have api.Resource use scala.io.Source

no need to roll our own here -- old code dates back to Java days
give methods in api.Resource more reasonable names
make Depend.scala reject references to unknown packages
Merge branch 'headless' into wip-mitosis-mark-two

Conflicts:
	src/main/compile/front/ExpressionParser.scala