SI-5361 Avoid cyclic type with malformed refinement

The statement `val x = this` in the refinment type:

    (new {}): {val x = this}

is lazily typechecked, in order to, according to the comment
in `typedRefinment, "avoid cyclic reference errors".

But the approximate type used ends up with:

    Refinment@1(
      parents = [...]
      decls = { val x: Refinement@1 })

This commit eagerly checks that there is no term definitions
in type refinments, rather than delaying this.

This changes the error message for SI-3614.
SI-5390 Detect forward reference of case class apply

Refchecks performs (among others) two tasks at once:

  - detecting forward references
  - translating `qual.Case(...)` to `new qual.Case(...)`

As is often the case with such multi-tasking tree traversals,
completion of one task precluded the other.
SI-5361 Refactor in accordance with review comments.

Check for malformed stats in the refinement body in
the same place we check for erroneous parents.
s/SuperCallArgs/SuperArgs/

Applies a minor renaming that I failed to thoroughly perform
in the last pull request which refactored parent types.
prevents spurious kind bound errors

The patch adds a check which makes sure that the trees we're about to
report aren't already erroneous.
Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef

Looks like the change in 25ecde037f22ff no longer forced
lazy annotations for some of the cases.
Also removed forcing for PackageDef annotations as we currently
don't support them.
SI-6288 Position argument of unapply

`atPos(pos) { ... }` doesn't descend into children of
already positioned trees, we need to manually set the
position of `CODE.REF(binder)` to that of the stunt double
`Ident(nme.SELECTOR_DUMMY)`.
SI-6288 Fix positioning of label jumps

ICode generation was assigning the position of
the last label jump to all jumps to that particular
label def.

This problem is particularly annoying under the new
pattern matcher: a breakpoint in the body of the final
case will be triggered on the way out of the body of
any other case.

Thanks to @dragos for the expert guidance as we
wended our way through GenICode to the troublesome
code. Chalk up another bug for mutability.

I believe that the ICode output should be stable
enough to use a a .check file, if it proves otherwise
we should make it so.
SI-6288 Remedy ill-positioned extractor binding.

The call to `Option#get` on the result of the
unapply method was unpositioned and ended up
with the position of the `match`.
Expand pattern match position tests.

 - Adds tests for unapplySeq and unapply: Boolean.
   Both seem to be well positioned after the previous
   changes.
Recurse into instantiations when stripping type vars.

This led to the inference of weird types as list
of lub base types was empty.
This change fixes case x3 in the test case.
simplifies checkBounds

This patch is an isomorphic transformation of checkBounds, which avoids
doing any checks altogether if the scrutinee is already erroneous.

Inspection of checkKindBounds and isWithinBounds called from checkBounds
suggests that they don't perform side effects which can't be omitted.
Merge pull request #1747 from hubertp/2.10.x-issue/6758

Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
Merge pull request #1758 from hubertp/2.10.x-issue/strip-tvars

When we strip tvars we should also recursively strip their instantiation...
Merge pull request #1742 from scalamacros/ticket/4044

prevents spurious kind bound errors
Merge pull request #1740 from scalamacros/topic/super-call-args

s/SuperCallArgs/SuperArgs/
typedIdent no longer destroys attachments

When transforming Idents to qualified Selects, typedIdent used to forget
about carrying original attachments to the resulting tree. Not anymore.
Merge pull request #1754 from retronym/ticket/6288

SI-6288 Perfecting positions
update mailmap
Merge pull request #1766 from scalamacros/topic/typed-ident-attachments

typedIdent no longer destroys attachments