Enforce consistency of pack, docs, osgi, maven tasks.

Instead of scattering properties all over invocations of
staged-docs, staged-pack, make-bundle, copy-bundle and mvn-package,
these are now all fully determined by the project they act on.

The varying arguments to these macros are all centralized.
They are named like `project.prop`, where `prop` is one of:
description, package, dir, name, namesuffix, version,
targetdir, targetjar, jar, docroot, skipPackage, srcdir, src, srcjar.

The defaults for these properties are computed using `init-project-prop`.
De-duplicate logic in maven deployment.
Render relevant properties to buildcharacter.properties
Collections library tidying and deprecation.  Separate parts are listed below.

Collections library tidying, part one: scripting.

Everything in scala.collection.scripting is deprecated now, along with the
<< method that is implemented in a few other classes.  Scripting does not
seem used at all, and anyone who did can easily write a wrapper that does
the same thing.

Deprecated *Proxy collections.

The only place proxies were used in the library was in swing.ListView, and
that was easy to change to a lazy val.

Proxy itself is used in ScalaNumberProxy and such, so it was left
undeprecated.

Deprecated Synchronized* traits from collections.

Synchronizability does not compose well, and it requires careful examination
of every method (which has not actually been done).

Places where the Scala codebase needs to be fixed (eventually) include:
  scala.reflect.internal.util.Statistics$QuantMap
  scala.tools.nsc.interactive.Global (several places)

Deprecated LinkedList (including Double- and -Like variants).

Interface is idiosyncratic and dangerously low-level.  Although some
low-level functionality of this sort would be useful, this doesn't seem
to be the ideal implementation.

Also deprecated the extractFirst method in Queue as it exposes LinkedList.
Cannot shift internal representations away from LinkedList at this time
because of that method.

Deprecated non-finality of several toX collection methods.

Improved documentation of most toX collection methods to describe what the
expectation is for their behavior.  Additionally deprecated overriding of
  - toIterator in IterableLike (should always forward to iterator)
  - toTraversable in TraversableLike (should always return self)
  - toIndexedSeq in immutable.IndexedSeq (should always return self)
  - toMap in immutable.Map (should always return self)
  - toSet in immutable.Set (should always return self)

Did not do anything with IterableLike.toIterable or Seq/SeqLike.toSeq since
for some odd reason immutable.Range overrides those.

Deprecated Forwarders from collections.

Forwarding, without an automatic mechanism to keep up to date with changes
in the forwarded class, is inherently unreliable.  Absent a mechanism to
keep current, they're deprecated.  ListBuffer is the only class in the
collections library that uses forwarders, and that functionality can be
rolled into ListBuffer itself.

Deprecating immutable set/map adaptors.

They're a bad idea (barring compiler support) for the same reason that all
the other adaptors are a bad idea: they get out of date and probably have a
variety of performance bugs.

Deprecated inheritance from leaf classes in immutable collections.

Inheriting from leaf-classes in immutable collections is rarely a good idea
since whenever you use any interesting collections method you'll revert to
the original class.  Also, the methods are often designed to work with only
particular behavior, and an override would be difficult (at best) to make
work.  Fortunately, people seem to have realized this and there are few to
no cases of people extending PagedSeq and TreeSet and the like.

Note that in many cases the classes will become sealed not final.

Deprecated overriding of methods and inheritance from various mutable
collections.

Some mutable collections seem unsuited for overriding since to override
anything interesting you would need vast knowledge of internal data
structures and/or access to private methods.  These include
  - ArrayBuilder.ofX classes.
  - ArrayOps
  - Some methods of BitSet (moved others from private to protected final)
  - Some methods of HashTable and FlatHashTable
  - Some methods of HashMap and HashSet (esp += and -= which just forward)
  - Some methods of other maps and sets (LinkedHashX, ListMap, TreeSet)
  - PriorityQueue
  - UnrolledBuffer

This is a somewhat aggressive deprecation, the theory being better to try it
out now and back off if it's too much than not attempt the change and be
stuck with collections that can neither be safely inherited nor have
implementation details changed.

Note that I have made no changes--in this commit--which would cause
deprecation warnings in any of the Scala projects available on Maven (at
least as gathered by Adriaan).  There are deprecation warnings induced
within the library (esp. for classes/traits that should become static) and
the compiler.  I have not attempted to fix all the deprecations in the
compiler as some of them touch the IDE API (but these mostly involved
Synchronized which is inherently unsafe, so this should be fixed
eventually in coordination with the IDE code base(s)).

Updated test checks to include new deprecations.

Used a higher level implementation for messages in JavapClass.
Extra repository hook via `extra.repo.url` var

Previously defaulted to 'https://oss.sonatype.org/content/repositories/releases',
now must be set manually. PR validation uses it to configure the repository
that has the artifacts published during validation.
More useful ant targets for faster pr validation
IDE needs actors/swing/continuations publish for validation.

As soon as they are also modularized, we can go back to
only building/publishing the core (lib/reflect/compiler).
Avoid needless TypeRef allocation during erasure.

  - ThisType(some.package) need not be erased, we can let
    that prefix through unchanged and avoid churning through
    allocations.
  - Sharpen the condition in `rebindInnerClass`. The answer
    to the deleted comment in the code, is "anonymous and
    local classes", which are specifically excluded in the
    new formulation.
  - Finally, detect if erasure of the TypeRef is an identity and reuse
    the original.

Waste not, want not.

To expand on the first point, here is what used to happen during
erasure:

    scala> val scalaPack = typeOf[Predef.type].prefix
    scalaPack: $r.intp.global.Type = scala.type

    scala> typeDeconstruct.show(scalaPack)
    res19: String = ThisType(package scala)

    scala> typeDeconstruct.show(erasure.scalaErasure(scalaPack))
    res20: String = TypeRef(TypeSymbol(final class scala extends ))

Showing one step of the erasure type map:

    scala> typeDeconstruct.show(scalaPack.asInstanceOf[SubType].underlying.typeOfThis)
    res21: String = SingleType(pre = ThisType(package <root>), package scala)
Address review comments

  - anonymize unused pattern binder
  - avoid negations
Merge pull request #3103 from Ichoran/topic/tidy-collections

Topic/tidy collections
A value class for Precedence.

One fewer Int to be whizzing around the parser hoping to
be confused with other Ints.
Rewrites the parser stack reduction logic.

Centralizes the scattered logic surrounding erroneous
pattern syntax. Consolidates the redundant lookahead
implementations. Eliminates var manipulation in favor
of recursion.
Parser stack reduction discussion

Check files
Parser stack reduction peekingAhead

Restores a form of the previous peekAhead bookkeeping.

Instead of tracking the current token and offset outside
of xxxAhead, peekingAhead uses `in.prev` and will push
back if the operation results in an empty tree.
Merge pull request #3094 from retronym/topic/erasure-opt

Avoid needless TypeRef allocation during erasure.
Merge pull request #3108 from adriaanm/faster-build

Faster PR validation
Merge pull request #3100 from som-snytt/paulp/reduction

Paulper stack reduction
Add buildcharacter.properties to .gitignore.
Merge pull request #3115 from paulp/pr/ant

Add buildcharacter.properties to .gitignore.
M6 modules, partest depends on scala as provided.

The new partest now marks its scala dependencies as provided.
This is much more robust than before, and it breaks ugly cycles.

Updated the build for partest-extras to provide the required
scala-compiler dependency.

Also, upgrade pax-url-aether to 1.6.0.

Since our jenkins uses mirrors with passwords,
we needed a fix for https://ops4j1.jira.com/browse/PAXURL-217
in order to run osgi.test on jenkins, now that we use maven more.
We didn't hit this bug before because we were using a standard
location for the maven local repository, but that causes problems
with concurrent jenkins jobs accessing it.

So, I added the following to `~/.m2/settings`,
and then ran into the issue described above.

Also removed some non-essential uses of the extra-repo (slows stuff down),
and added a comment of how to make the osgi tests look in a certain
local m2 repo (for /some/ operations...)

```
<!--
  Maven repos are not safe for concurrent access, thus give each job its own.
  The WORKSPACE env var is set by jenkins to the path of the current job's workspace.
  This settings file will cause ant/maven to break if WORKSPACE is not set (to a writeable directory).
  I don't know how to encode a fall back, but I assume it's not needed as this is ~jenkins/.m2/settings.xml
-->
<localRepository>${WORKSPACE}/m2repo</localRepository>
```