SI-5767 fix + small HashSet/HashMap fixes

- `LinkedHashSet` implementation moved from `FlatHashTable` to `HashTable`
   - `remove` time reduced from O(n) to O(1)
   - `diff` time reduced from O(n^2) to O(n)
- A bit of refactoring in `HashTable` serialization code
- Putting an element into hash map now avoids double hash code/hash index
  calculation (see `HashTable#findOrAddEntry`)
- bugfix: compiler/LambdaLift occasionally breaks LinkedHashSet integrity
Making public methods of FlatHashTable protected

As discussed in https://groups.google.com/forum/?pli=1#!topic/scala-internals/1yABM30POS0
More relative path elimination.

Some names I missed in 55b609458fd .

How one might know when one is done:

  mkdir scratch && cd scratch
  mkdir annotation beans collection compat concurrent io \
    math parallel ref reflect runtime scala sys testing \
    text tools util xml
  scalac $(find ../src/library -name '*.scala')

Until recently that would fail with about a billion errors. When it
compiles, that's when you're done.  And that's where this commit
takes us, for src/library at least.
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.
moves isImplicit from TermSymbol to Symbol

Because classes can also be implicit.
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 #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
refactors java reflection tests

All javac-produced artifacts are now placed into test/files/lib
Merge pull request #1321 from namin/apply-dynamic-sugar

Fixed SI-6353: applyDynamic with sugared applications
Revert "Fix SI-6294."

This reverts commit cb393fcbe35d0a871f23189d791b44be1b826ed2.

Conflicts:

	src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
Revert "Fix SI-4581."

This reverts commit 373f22a2022519ab894c1ea77460e6460d7c2ee4.