Before:
```
$ time sbt --client exit
[info] entering *experimental* thin client - BEEP WHIRR
[info] terminate the server with `shutdown`
sbt --client exit 0.16s user 0.15s system 101% cpu 0.303 total
```
sbt --client was running around 303ms (median out of 5) on my machine.
```
$ time sbtn exit
[info] entering *experimental* thin client - BEEP WHIRR
[info] terminate the server with `shutdown`
sbtn exit 0.05s user 0.05s system 112% cpu 0.085 total
```
On the other hand, sbtn ran in 85ms (median out of 5).
After:
```
$ time ~/work/sbt-modules/sbt-launcher-package/target/universal/stage/bin/sbt --client exit
[info] entering *experimental* thin client - BEEP WHIRR
[info] terminate the server with `shutdown`
~/work/sbt-modules/sbt-launcher-package/target/universal/stage/bin/sbt exit 0.06s user 0.08s system 111% cpu 0.127 total
```
By delaying the java version detection, I got it down to 127ms.
The script simply prints out each argument in an unambigous form on a single
line and handles to the `--version` option.
For windows, add `java.cmd` script which simply calls the former `java` script.
Using `--no-share` as a command line option resulted in a single additional
argument added to the java command:
`-Dsbt.global.base=project/.sbtboot -Dsbt.boot.directory=project/.boot -Dsbt.ivy.home=project/.ivy`
Actually, three separate arguments need to be added.
Ref https://github.com/sbt/sbt/issues/5665
This implements `--client` option to use `sbt` script as the sbtn runner. The build user can also set the env variable `SBT_NATIVE_CLIENT` to `true`.
The script will attempt to parse `project/build.properties` and use sbtn only when it's sbt 1.4 or above.
Solves the issue where providing sbt_options and java_args containing whitespaces on Java 9 and higher would fail. Expansion of sbt_options and java_args containing whitespaces would not expand correctly in copyRt(), but instead would create an invalid java command due to missing quotes.