Fix typing idempotency bug with Annotated trees

typedAnnotated transforms an Annotated tree into a Typed tree. The
original field of the result is set to the Annotated tree.

The bug was that typedAnnotated was using the untyped Annotated tree
as original, but also set its type. When re-typing later on the same
Annotated tree, the typer would consider it as alreadyTyped. This
is incorrect, the typer needs to convert Annotated trees to Typed.

Also, the Annotated tree only had its type field set, but its children
were still untyped. This crashed the compiler lateron, non-typed trees
would get out of the typing phase.
Fix SI-7130: Memory leaked caused by Statistics

As described in the ticket, we were leaking memory by holding reference
to Global through by-name argument that was captured by an instance of
a class stored in global HashMap `qs`.

The fix is simple: do not register quantities in HashMap unless statistics
is enabled. This way, if Statistics is disabled we do not store any
references.

We still leak memory in case of statistics being enabled.
SI-7134: don't require doc.Settings in base api of scaladoc.
make Future scaladoc examples up-to-date and compilable
Removing disabled, unneeded futures tests
Additional test case for Lukas' fix to annotated originals.

This was inspired by the regression that Mark encountered
when upgrading SBT from 2.10.0 to 2.10.1-RC1.
Merge pull request #1 from retronym/topic/annotatedRetyping-test

Additional test case for Lukas' fix to annotated originals.
unit test ide-t1000567 exercises SI-5063, aka #1000567.
SI-7143 Fix scanner docComment: docBuffer and docPos are initialized
in different places and as a result can get out of sync and as a result
the invariant that docComment has a position is broken.
Merge pull request #2131 from jozic/scaladoc-cleanup

make Future scaladoc examples up-to-date and compilable
Merge pull request #2135 from heathermiller/futures-cleanups

Removing disabled, unneeded futures tests
Merge pull request #2137 from huitseeker/issue/value-protected-in-inherited-1000567

SI-5013 / #1000567 : added presentation test for fixed bug
Merge pull request #2130 from vigdorchik/relax_doc

SI-7134: don't require doc.Settings in base api of scaladoc.
Merge pull request #2136 from vigdorchik/scanners

SI-7143 Fix scanner docComment production.
Merge pull request #2129 from gkossakowski/issues/SI-7130-Statistics

Fix SI-7130: Memory leaked caused by Statistics
Merge pull request #2118 from lrytz/annotatedRetyping

Fix typing idempotency bug with Annotated trees
bump build number to 2.10.2
Merge pull request #2146 from adriaanm/build-2.10.2

bump build number to 2.10.2
SI-7074 Fix xml attribute sorting