[nomaster] macro expansions are now auto-duplicated

The fix still requires macro developers to be careful about sharing trees
by references, because attributed DefTrees will still bring trouble.

However this is an improvement, because it doesn't make matters worse
and automatically fixes situations similar to one in the test.

A much more thorough discussion with a number of open questions left:
http://groups.google.com/group/scala-internals/browse_thread/thread/492560d941b315cc

Was fixed ages ago in master in one of the paradise backports.
Never got to 2.10.x, but it's very useful, so I'm backporting it now.
SI-7716 Exclude patmat synthetics from bounds checking

Consider this pattern match translation, that occurs *before* refchecks:

    scala> val e: java.lang.Enum[_] = java.util.concurrent.TimeUnit.SECONDS

    scala> e match { case x => x }
    <console>:9: error: type arguments [_$1] do not conform to class Enum's type parameter bounds [E <: Enum[E]]
                  e match { case x => x }
                  ^
    [[syntax trees at end of                 refchecks]] // <console>
    package $line5 {
              case <synthetic> val x1: Enum[_$1] = $line3.$read.$iw.$iw.e;
              case4(){
                matchEnd3(x1)
              };
              matchEnd3(x: Enum[_$1]){
                x
              }

RefChecks turns a blind eye to the non-conformant type `Enum[_$1]` in
the label defs because of `65340ed4ad2e`. (Incidentally, that is far
too broad, as I've noted in SI-7756.)

This commit extends this exception to cover the synthetic ValDef `x1`.

Commit log watchers might notice the similarities to SI-7694.
Merge pull request #2814 from xeno-by/topic/auto-duplicate-expansions

[nomaster] macro expansions are now auto-duplicated
SI-7603 Fix thread safety of FlagTranslation

This is outside of the Global cake, so we can't assume single
threaded access. A var was introduced in af3daf6fdb that can lead
to incorrect flag interpretation. The reported bug was triggered
in a multi-project SBT build. Java Annotations read from classfiles
were occasionally conferred the TRAIT|INFERFACE|ABSTRACT flag set,
leading to "@Foo is abstract, cannot be instatiated" later down the
line.
SI-7603 Remove diagnostic code for annotation error

We've fingered the true culprit in the previous commit.
Merge pull request #2842 from retronym/ticket/7603-2

SI-7603 Fix thread safety of FlagTranslation
Merge pull request #2838 from retronym/ticket/7716

SI-7716 Exclude patmat synthetics from bounds checking