Bash launcher refactor

This is the beginnings of a refactoring for the bash launcher.  I intend to modernize it and fix the following bug.

Currently the JRUBY_OPTS and option parsing code requires options that affect some kinds of code to be earlier in the option list than other kinds.  For example:

```
JRUBY_OPTS="--profile.html --profile.out test.html --sample" bin/jruby test.rb
```
this returns: jruby: unknown option --sample

```
bin/jruby --profile.html --profile.out test.html --sample test.rb
```
as does this.

This means that some options cannot currently be specified in JRUBY_OPTS if it is at all possible that anything launched with JRUBY_OPTS set may use some other options.

This rewrite is still in progress, I'm sending the pull request in case I end up not having time to finish it.
technically it could, but the variable assignment is not needed, `exit $?` would be enough
from man bash:

> If command cannot be executed for some  reason,  a  non-interactive shell exits, unless the shell option execfail is enabled, in which case it returns failure.