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
Merge remote-tracking branch 'origin/headless' into widgets

Conflicts:
	src/main/api/ModelReader.scala
	src/main/plot/PlotLoader.scala