Fix for SI-5385.

Nodes which hit EOF with no whitespace afterward had
wrong position.
Implement @static annotation on singleton object fields.

This commit introduces the `@static` annotation on fields of static singleton objects.

A static singleton object is a top-level singleton object or an object nested within
a static singleton object.

The field annotated with `@static` is generated as a true static field in the companion
class of the object. The initialization of the field is done in the static initializer of the
companion class, instead of the object itself.

Here's an example. This:

    object Foo {
      @static val FIELD = 123
    }
    class Foo

generates :

   object Foo {
     def FIELD(): Int = Foo.FIELD
   }
   class Foo {
     <static> val FIELD = 123
   }

The accessor in `object Foo` is changed to return the static
field in `class Foo` (the companion class is generated if it is
not already present, and the same is done for getters if `FIELD`
is a `var`).

Furthermore, all the callsites to accessor `Foo.FIELD` are rewritten
to access the static field directly.

It is illegal to annotate a field in the singleton object as `@static` if there is
already a member of the same name in `class Foo`.

This allows better Java interoperability with frameworks which rely on static fields being
present in the class.
The `AtomicReferenceFieldUpdater`s are one such example. Instead of having
a Java base class holding the `volatile` mutable field `f` and a static field containing
a reference to the `AtomicReferenceFieldUpdater` that mutates `f` atomically,
and extending this Java base class from Scala, we can now simply do:

    object Foo {
      @static val arfu = AtomicReferenceUpdater.newUpdater(
        classOf[Foo], classOf[String], "f"
      )
    }
    class Foo {
      @volatile var f = null
      import Foo._
      def CAS(ov: String, nv: String) = arfu.compareAndSet(this, null, "")
    }

In summary, this commit introduces the following:
- adds the `@static` annotation
- for objects without a companion class and `@static` members, creates a companion class
(this is done in `CleanUp`)
- checks for conflicting names and if `@static` is used on static singleton object member
- creates the `static` field in the companion class for `@static` members
- moves the field initialization from the companion object to the static initializer of
the class (the initialization of `@static` members is bypassed in the `Constructors` phase,
and added to static ctors in `CleanUp`)
- all callsites to the accessors of `@static` are rewritten to access the static fields directly
(this is done in `GenICode`)
- getters and setters to `@static` fields access the static field directly, and the field in the
singleton object is not emitted (this is done in `GenICode`)
- changes in `GenJVM`, `GenASM` - now computing local var indices in static initializers
as well - this was an oversight before, now is necessary

Future work: allow the `@static` annotation on methods as well - this will
be added in a future commit.

Review by @odersky, @dragos, @paulp, @heathermiller.
WIP add private/lazy checks and a few tests.
Updated list of targets allowed in Ant's scalac.

It looks like scala.tools.ant.Scalac class had
a stale list of allowed targets. Made it in sync
with what compiler supports.
Better debugging output in GenASM.

When assertion fails, let's provide
the context.
Deprecate all JVM 1.5 targets and make 1.6 default.

Add a check if deprecated target is being used. I put
that check into `checkDeprecatedSettings`. I tried to
invent some general mechanism for deprecating choices
in ChoiceSetting but I gave up eventually. It wasn't
worth it the complexity. Also, with current approach
I'm able to provide nice, customized deprecation
warning.

Make `jvm-1.6` a default backend.

Altered test for SI-5957 because it crashes the backend.
However, the problem is not with backend but with symbol
creation. We get two different symbols with the same
internal name and both are used in trees that reach
GenASM. See SI-6109 for details.

Review by @magarciaEPFL and @paulp.
Switch to 1.6 target for all javac invocations.

Switch to 1.6 target for all javac invocations
we perform in build.xml. This way we do not
emit java 1.5 byte-code either from scalac
or javac. This commit should complete the move
off java 1.5 byte-code.
Use `findMember` to lookup the static field in the host class.

The upcoming `findMember` optimizations should ensure that this
is fast enough.
Removes redundant outers

Widens the criterion when outer fields can be omitted. It used to be that sub- and superclass had to be enclosed by the same outer class. Only in that case was the outer field of the class omitted. We now omit if subclass is contained in an outer class that is itself a subclass of the superclasses outer class.

See test case "outertest.scala" for an example.
address "this would catch all throwables" warnings

original patch by @odersky in #955 -- criterion for the refactor:
"catch Throwable as long as there's no obvious control flow exception going through the catch
and the caught exception is processed further"

rebased & updated with review comments in #955 and #954
Merge pull request #894 from axel22/topic/static-annot-cherry-2.10.x

Implement @static annotation on singleton object fields.
Merge pull request #948 from gkossakowski/target-1.6

Deprecate all JVM 1.5 targets and make 1.6 default.
Merge pull request #924 from hubertp/2.10.x-issue/5385

Fix for SI-5385.
Merge pull request #954 from odersky/optimize/outer

Removes redundant outers
Merge pull request #957 from adriaanm/annoying-throwable

address "this would catch all throwables" warnings