SI-6701 add SYNTHETIC flag to the reflection api
SI-7304 improve deprecation warnings for tree factory methods
SI-1909 Move tests from pos to run

When we're in the neighbourhood of VerifyErrors, it's better to run
the code.

This change is leading up to a fix for SI-3832, which regressed
with fix for SI-1909.
SI-3832 Extract tracking of under-construction classes to a mixin

In order to reduce the noise in OuterPathTransformer.
SI-3832 Don't lift methods in aux constructor trailing stats as STATIC

SI-1909 modified LambdaLift to lift in auxiliary constructors methods as STATIC
so they could be called before the self-constructor was called.

That allowed for:

     class Foo (x: Int) {
       def this() = this( {
         def bar() = 5
         bar
       })
    }

However, if the method is in a statement that trails the self constructor call,
this is unnecessary and in fact incorrect as it robs the lifted method of `this`.

This commit uses the machinery established in SI-6666 to limit the STATIC-ness
of lifted methods to those used in arguments for self-constructor calls.

This is used exclusively; the `isAuxillaryConstructor` check wasn't the right
way to solve this, as was seen by the regression it caused in SI-3832.
A new test case shows that we can statically lift methods in super-constructor
calls, rather than just self-constructor calls.

We also have to avoid statically lifting objects in these positions. For now,
I just emit a dev warning that a VerifyError is in your future. With some more
thought we could escalate that to a implementation restriction and emit an error.
SI-7007 Test case shows we disallow premature `this` access

Rather than the old behaviour, which compiled successfully
but led us into the jaws of a LinkageError.

Related to SI-6666.
SI-7223 More finesse in setting INCONSTRUCTOR

It's a clunky flag used to determine very early on whether
we're in the self-call, super-call or early-init section.

In SI-6666 / fd6125428, the check was improved to consider nesting.
But, that caused this regression, as Function's haven't been
translated to classes yet, so our check for enclosing non-term
owners failed wrongly flagged definitins body of a anonymous function
as INCONSTRUCTOR.

With this patch, we correctly flag:

    class C extends D {
      // INCONSTRUCTOR
      () => {
        !INCONSTRUCTOR
      }
      // INCONSTRUCTOR
    }
SI-6489 parsing in macros should provide proper positions

1. macro parsing doesn't use toolbox any more but calls parser directly

2. in order for this to work parser has to be refactored to limit
   usage of currentUnit and rewire it into parser's local unit
   method which might use currentUnit for some parsers but will
   user proper unit for UnitParser

3. similar change has to be done to make compilation unit's
   reporter overridable
refactor variable arity definitions

Transform current arrays of symbols into function-like objects
that return NoSymbol at all places where corresponding arity isn't
available.
Corrects behavior of finalResultType.

The implementation had come to depend on finalResultType
accidentally doing things beyond its charter - in particular,
widening types. After hunting down and fixing the call sites
depending on the bugs, I was able to rewrite the method to do
only what it's supposed to do.

I threw in a different way of writing it entirely to suggest how
some correctness might be obtained in the future. It's a lot
harder for a method written like this to break.
Widen type of outer accessor.

This is the key ingredient so TypeTree(sym) can resist
widening the type.
Reducing variation of tree creation methods.

TreeDSL has no future - it was always a temporary measure
waiting for something like quasiquotes to come along. In this
commit I cull as much of it as I can, especially the delicate
matter of creating new DefDefs and ValDefs, which I completely
turn over to the old style creators.

I unified all the symbol-based DefDef and ValDef creators under
a single method, since it was yet another place where ctrl-C and
ctrl-V were being punched with glee. Was beaten to the punch on
adding copyTypeDef to fill out the *Def creators.

Eliminated as many redundant positioning calls as I could find.
If you are creating a DefTree tree based on a symbol, it will
always have an atPos(sym.pos) { ... } wrapped around it. You
don't need another one.

All of this is motivated by positions work: positions are
assigned in so many places and in such an ad hoc fashion that
it is impossible to bring consistency to that without first
bringing some consistency to tree creation.
SI-7843 Restore JSR 223 service entry

The 2.10 fix to remove the ScriptEngine service entry
was inadvertently forwarded to 2.11.

This commit reverts and adds a test.

This situation was entirely foreseen by retronym,
proving beyond doubt that he is in fact a time traveler,
as hinted by his name. He brings bugs forward into the
future and returns into the past with fixes and other
alien technology like scalaz.
Merge pull request #2945 from som-snytt/test/jsr223-service

SI-7843 Restore JSR 223 service entry
Merge pull request #2931 from paulp/pr/TreeDSL

Reducing variation of tree creation methods.
Merge pull request #2884 from retronym/ticket/3832

SI-1909 SI-3832 SI-7007 SI-7223 Improved handling of larval objects
SI-7844 Intellij setup.sh is not working for Ubuntu 12.04

Added "-f" option to the command "rm"
Merge pull request #2946 from jinfu-leng/ticket/7844

SI-7844 Intellij setup.sh is not working for Ubuntu 12.04
SI-7845 Disable test for JSR 233

For Paul, it steals focus when it runs.

For me, it fails with some platform specific extra output:

-ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider apple.applescript.AppleScriptEngineFactory could not be instantiated: java.lang.UnsatisfiedLinkError: no AppleScriptEngine in java.library.path
 n: Object = 10
 12345678910

So off to the holding pen for now.
Merge pull request #2948 from retronym/ticket/7845

SI-7845 Disable test for JSR 233