Reworking of annotation arg parser.

Paradoxically it has less duplication but is longer.
That's the way it goes sometimes.
Merge pull request #1314 from paulp/pullreq-1306

Pullreq 1306
SI-6336 Disallows value types in structuralal refinements

Structural refinements already have a number of restrictions, e.g. cannot refer to
type parameters of enclosing classes. We need to disallow value classes as well.
Merge commit 'refs/pull/1306/head' into 2.10.x

* commit 'refs/pull/1306/head':
  SI-6356 reflection now supports Java annotations
Merge pull request #1319 from paulp/eugene-pullreq-1306

Eugene pullreq 1306
moves isImplicit from TermSymbol to Symbol

Because classes can also be implicit.
Merge pull request #1310 from scalamacros/ticket/6329

test suite for SI-6329
Fixed SI-6353: applyDynamic with sugared applications

- Accept sugared applications such as x(1) if x implements Dynamic,
  so x(1) gets re-written to x.apply(1).
- When picking a dynamic rewrite for x.apply(1), favor applyDynamic
  instead of the default selectDynamic.
Merge pull request #1309 from paulp/210-no-relative-paths

More relative path elimination.
Moved constant empty arrays into Array companion.

This reminds me of at least one reason I didn't put them
here before: I don't feel like I can return these from calls
to Array.empty, because there's no way of knowing whether
anyone has been relying upon this property:

  scala> Array.empty[Byte] eq Array.empty[Byte]
  res0: Boolean = false

Since that is exactly the property I need to alter.
The test above is true in all the "real" collections,
which is all the more reason to be concerned that someone
might be using empty arrays as not-equivalent sentinels.

I can still move them here, but it'd be a lot better if
array creation could use them - not only def empty but

  def apply[T: ClassTag](xs: T*): Array[T]

which probably creates millions of empty arrays where
one would do in almost every case.
Revert "Added constant empty array to the companion objects."

This reverts most of commit 9d84e89d2 .
Merge pull request #1307 from sgolodetz/rangeposfix

Make the scalac Ant task recognise -Yrangepos
Merge pull request #1308 from soc/SI-4478

SI-4478 Replaces wrt with (hopefully) slightly improved wording.
Merge pull request #1318 from odersky/ticket/6336

SI-6336 Disallows value types in structuralal refinements
Merge pull request #1322 from paulp/topic/emptyArray

Topic/empty array
SI-6374 Scala reflection now supports Java CRTP

Translation of Java types to Scala types has previously been
existentionalizing raw types of ParameterizedType arguments.

As shown in https://issues.scala-lang.org/browse/SI-6374
this leads to cyclic reference errors. If you wonder about the
mechanism of the error, take a look at the comments to the
aforementioned issue - there's a detailed explanation.

However calling rawToExistential is completely unnecessary, because
existential parameters of the results are immediately discarded,
and only prefix and symbol are used later on (which means that
existential extrapolation performed by rawToExistential also doesn't
after the result).

Finding out this was tough, but the rest was a piece of cake.
Getting rid of the call to rawToExistential when translating ParameterizedType
fixed the problem.
Reflection no longer produces faux existentials

Because of using plain ExistentialType factory of a case class
typeToScala sometimes returned existentials with empty quantifieds.

Changing ExistentialType to newExistentialType, which simply returns
the underlying types if params are empty, fixed the problem.
SI-6374 Reflection now works for anns with enum fields

Enum members are static and, therefore, they need to be looked up in
classSymbol(<enum>).companionModule, rather than in classSymbol(<enum>).
Merge pull request #1320 from scalamacros/topic/is-implicit

moves isImplicit from TermSymbol to Symbol
Fixes SI-6337 by disallowing nested value classes.

It seems for the moment too hard to allow this, and the functionality to have value classes wrap other value classes does not seem essential.