Generalize RhinoBasedRun.

It can now use any object for the console (or none), which means
it is not tight to an sbt logger anymore.

It can also run a main method in a top-level object.