Add option -port to fsc

Option "port" limits compile server lookup and start to given port.
Normally fsc will start a compile server in a random port if no server
is yet running. This can be problematic with firewalls and/or remote
compile servers. Option "port" should not be confused with option
"server" which looks for a compile server in given host and port and
fails if such server is not found.

Automatic tests for command line user interface do not exist at all.
Thus, adding a test for one new option would require designing a whole
new testing method.
Let users specify a different location for build repos than user home

This change is helpful e.g. when setting up CI for Scala and it's important which directories are used by a build.
By default it uses .m2, .pax and .sbt/cache from user home (in general $HOME). Sometimes it's not possible to use
this location and also changing a value of $HOME is not an option.

The required location should be specified both for ant's build.xml and used scripts.
In the first case specifying -Duser.home is all, what we need. But we can't just set _JAVA_OPTIONS
as then partest tests fail due to the unexpected output (an additional 'Picked up java options (...)' messages).
We can set ANT_OPTS instead of this. The only problem was that OSGi JUnit tests (only they) were using $HOME anyway.
I forced them to use -Duser.home by propagating this option in build.xml.

binary-repo-lib.sh is changed to use a special env variable or $HOME, when this variable is not set.

Then we can do:

export SCALA_BUILD_REPOS_HOME=<some_dir>
export ANT_OPTS="$ANT_OPTS -Duser.home=$SCALA_BUILD_REPOS_HOME"
ant dist

and it will create all directories .m2, .pax and .sbt/cache in a specified $SCALA_BUILD_REPOS_HOME directory.

Note: maven's settings.xml should be located in this used $SCALA_BUILD_REPOS_HOME/.m2 and point to the
repository like <some_dir>/.m2/repository
Fixes memory leak when using reflection

References to Threads would be retained long after their termination if
reflection is used in them. This led to a steady, long memory leak in
applications using reflection in thread pools.
Merge pull request #4148 from SpinGo/issue/SI-8946

SI-8946: Fixes memory leak when using reflection
SI-8754  linear seqs aren't

LinearSeqLike still isn't exactly linear (LinearSeqOptimized is), but at least the docs now give reasonably correct information about what is actually going on.
Merge pull request #4130 from mpociecha/let-specify-build-repos-home

Let users specify a different location for build repos than user home
Merge pull request #3934 from teemulehtinen/fsc-port-arg

FSC server port selected by argument
SI-8946 Disable flaky test for reflection memory leak

It passed in PR validation but failed in a later run.
There are some clever ideas bouncing around to make it
stable, but in the meantime I'll shunt it into disabled.
Merge pull request #4170 from retronym/ticket/disable-8946

SI-8946 Disable flaky test for reflection memory leak
SI-8502 Improve resiliance to absent packages

When unpickling a class, we create stub symbols for references
to classes absent from the current classpath. If these references
only appear in method signatures that aren't called, we can
proceed with compilation. This is in line with javac.

We're getting better at this, but there are still some gaps.
This bug is about the behaviour when a package is completely
missing, rather than just a single class within that package.

To make this work we have to add two special cases to the unpickler:

  - When unpickling a `ThisType`, convert a `StubTermSymbol` into
    a `StubTypeSymbol`. We hit this when unpickling
    `ThisType(missingPackage)`.
  - When unpickling a reference to `<owner>.name` where `<owner>`
    is a stub symbol, don't call info on that owner, but rather
    allow the enclosing code in `readSymbol` fall through to
    create a stub for the member.

The test case was distilled from an a problem that a Spray user
encountered when Akka was missing from the classpath.

Two existing test cases have progressed, and the checkfiles are
accordingly updated.
Merge pull request #4112 from retronym/ticket/8502

SI-8502 Improve resiliance to absent packages
Merge pull request #4149 from Ichoran/issue/8754

SI-8754  linear seqs aren't
add 0X... for hex number literal
add 0X...hex number literal in syntax summary
Merge pull request #4172 from advancedxy/spec-fix

add 0X... for hex number literal