[no-master] Fix #3872: Fix parsing of Scala versions in scalajsc.
[no-master] Fix #3872: Fix parsing of Scala versions in scalajsc.

In particular, support any number of digits for the minor and patch
versions.

There are changes only in the Unix variant of the script. The
Windows variant already supports any number of digits in the patch
version. It still only tolerates minor versions with exactly 2
digits, because it seems hard to support other formats, and we are
not going to hit that problem in the life span of Scala.js 0.6.x.

scala-js/scala-js,gzm0/scala-js,sjrd/scala-js,gzm0/scala-js,sjrd/scala-js,scala-js/scala-js,scala-js/scala-js,sjrd/scala-js