[backport] Add buildcharacter.properties to .gitignore.

(cherry picked from commit 693e55e1cb75055bb243ffca2e18b8e44e80bb8c)
Merge pull request #3116 from retronym/topic/backport-character-ignore

Add buildcharacter.properties to .gitignore.
SI-7568 Adding Serializable to ResizableArrayAccess inner class of PriorityQueue
SI-7747 Support class based wrappers as alternative through switch -Yrepl-class-based

Refactoring to reduce the number of if-else

Fix test.
SI-7747 Support class based wrappers clean up

Simplified the code paths to just use one of two `Wrapper` types
for textual templating.

Simplified the class-based template to use the same `$iw` name
for the both the class and the wrapper value.  In addition,
the $read value is an object extending $read, instead of containing
an extra instance field, which keeps paths to values the same
for both templates.

Both styles trigger loading the value object by referencing the
value that immediately wraps the user code, although for the
class style, inner vals are eager and it would suffice to load
the enclosing `$read` object.

The proposed template included extra vals for values imported
from history, but this is not necessary since such an import
is always a stable path. (Or, counter-example to test is welcome.)

The test for t5148 is updated as a side effect. Probably internal
APIs don't make good test subjects.

Modify -Y option message.
SI-7568 Adding PriorityQueueTest
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>
```
Merge pull request #3114 from adriaanm/to-m6

M6 modules, partest depends on scala as provided.
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.

Also, upgrade STARR because Jenkins is using `skip.locker` now.

See https://groups.google.com/d/msg/scala-internals/7R-Y5txP8NI/DX_JWFO2fu4J
for a discussion of the problem this should fix.
Use an intrinsic for the next power of two calculation and also return the input as is if it is already a power of two
Filter dependencies from partest and scalacheck.

I previously messed this up in a24e7fa, which caused
partest classpath again to include multiple version
of scala-library and friends.

We should really automate enforcing uniqueness of packages.
deduplicate tuple tree creation code

Previously tuple tree generation code has been implemented in
three place: tree builder, tree gen, build utils. Now it's just
defined once in tree gen.
make internal implementation of universe.build less restrictive

1. Use protected instead of private to avoid needless lock-in

2. Use BuildImpl field type to expose non-protected members to the
   compiler (user-facing side in the reflection api stays the same)
add hasAttachment utility method to the internal api
add some post-typecheck tests for quasiquotes

Typecheck trees with toolbox and check that they are still matched
by corresponding quasiquote. Fix tuples and function types matchers
to account for different shape of trees after typing.
simplify imports in quasiquotes scalacheck tests
add support for importable attachments

Previously attachments weren't imported by importTree. Now a new marker
trait has been added that lets attachments to import themselves to the
new universe together with all their innards. Additionally a simpler
subtrait is defined to mark attachments that can be imported as-is.
make fresh names compare similar in quasiquotes

Otherwise it's annoying that trees that look the same are not equal
due to some fresh name hidden underneath. Due to this one test needs
to be changed to use plain equalsStructure.
change intermidiate representation of for loop enumerators

Encode values into real trees rather than non-tree case classes.
This is needed for re-usability of desugaring code between quasiquotes
and parser.
move for loop desugaring into tree gen