SI-7519 Less brutal attribute resetting in adapt fallback

Prefers `resetLocalAttrs` over `resetAllAttrs`. The latter loses
track of which enclosing class of the given name is referenced by
a `This` node which prefixes the an applied implicit view.

The code that `resetAllAttrs` originally landed in: https://github.com/scala/scala/commit/d4c63b#L6R804
SI-7498 ParTrieMap.foreach no longer crashes

Previously, the `split` method of the `ParTrieMap` iterator threw
an exception when splitting a splitter that iterated over nodes
whose hash codes collide.
This was due to reusing the iterator of the list of colliding keys
rather than creating a new splitter.

This commit changes the `subdivide` method to create a new
iterator using the factory method of the current trie map
iterator rather than returning a `LinearSeqLike` iterator.
SI-7264 Initialize owner when searching for companion.

From ClassSymbol:

    protected final def companionModule0: Symbol =
      flatOwnerInfo.decl(name.toTermName).suchThat(sym => sym.isModuleNotMethod && (sym isCoDefinedWith this))

    protected final def flatOwnerInfo: Type = {
      if (needsFlatClasses)
        info
      owner.rawInfo
    }

Note the call to `rawInfo`; in the enclosed test case, that gives
us back an uninitialized type for the module class of `Foo`, and
consequently we don't find the companion for `Foo.Values`.

This commit forces the initialization of the owning symbol if it
was compiled in a prior run.

In addition, it adds a special case to `Run#compiles` for early
initialized symbols, which start out in life with the wrong owner.
As best as I can see, that complexity stems from allowing early
initialized members *without* return types to be used as value arguments
to the super call, which in turn is needed to infer parent type arguments.
The situation is described a little further in existing comments of
`typedPrimaryConstrBody`.

This bug is essentially another case of SI-6976. See the comments in pull
request of that patch (https://github.com/scala/scala/pull/1910) for
commit archaeology that shows why we're reluctant to force the owner
info more broadly than is done in this commit.
SI-6308 Specialize methods that have some unspecialized params

This is a continuation of 1591c14e50, which didn't go far enough
to handle method calls with a mix of specialized and unspecialized
type parameters.

This commit modifies `specSym` to calculate the residual type
of the original method after specialized type parameters have
been removed and the type environment of the candidate specialized
variant has been subsituted.

For example, here is trace of `specSym` when searcing for the
specialized variant of `f4` in the enclosed test:

    tree             = Main.this.f4[Nothing, Int]
    tree.tpe         = (a: Int, b: List[(Int, Nothing)])String
    fun.tpe          = [B, A](a: A, b: List[(A, B)])String
    residualTreeType = [B](a: Int, b: List[(Int, B)])String
    memberType       = [B](a: Int, b: List[(Int, B)])String
    env              = Map(type A -> Int)
    doesConform      = true

A few "todo" tests are included that highlight an endemic
issue with the current specialization implementation: type
parameters that show up after `uncurry` might be clones of
the original symbols from typer, if they have been through
a TypeMap (e.g. within a call to `uncurryTreeType`). So testing
them for existence with the `typeEnv` map is fruitless.

No amount of `atPhase` acrobatics can rescue us from this;
we need to transport this information in a symbol-cloning
resiliant manner. Maybe Symbol Attachments?
Document exceptions thrown in some conversion methods of String
Fix incorrectly documented exception of toBoolean method of String
SI-7564 Fix detection of reflective calls on Avian

Base_1.scala checks whether reflection was used by inspecting
the stacktrace and looking for “java.lang.reflect.”.

The stacktrace looks differently on Avian and therefore the
test fails.

This change looks for “sun.reflect.” instead, which seems to
work on OpenJDK and Avian.
Eliminate needless Options.

Many of our core types have dedicated sentinels which serve
perfectly to communicate "no value", even more perfectly than
None. Saving a billion allocations is gravy.
SI-6503 Fix scaladoc output to generate valid HTML5

I checked the generated HTML with the validators provided by
http://validator.w3.org/ and http://html5.validator.nu/ to verify that
all issues have been fixed.

Changes:
- Adapt doctype
- Remove processing instructions
- Add alt attributes to image tags

Before that, the output tried to be XHTML 1.1, but failed validation as
attested by both validators mentioned above, making it more likely to
trigger the quirks modes in browsers.
Merge pull request #2642 from soc/SI-7564

SI-7564 Fix detection of reflective calls on Avian
Merge pull request #2630 from retronym/ticket/6308

SI-6308 Specialize methods that have some unspecialized params
Merge pull request #2596 from retronym/ticket/7519

SI-7519 Less brutal attribute resetting in adapt fallback
Merge pull request #2533 from soc/SI-6503

SI-6503 Fix doctype, remove processing instructions, ...
Merge pull request #2617 from paulp/pr/use-dedicated-sentinels

Eliminate needless Options.
Merge pull request #2610 from axel22/issue/7498

SI-7498 ParTrieMap.foreach no longer crashes
Merge pull request #2640 from jedesah/patch-1

Document exceptions thrown in some conversion methods of String
Merge pull request #2621 from retronym/ticket/7264

SI-7264 Initialize owner when searching for companion.