SI-7039 unapplySeq result type independent of subpattern count

Fixes a bug in the implementation of the `unapplySeq` part of the spec below.

An `unapply` method with result type `R` in an object `x` matches the
pattern `x(p_1, ..., p_n)` if it takes exactly one argument and, either:
  - `n = 0` and `R =:= Boolean`, or
  - `n = 1` and `R <:< Option[T]`, for some type `T`.
     The argument pattern `p1` is typed in turn with expected type `T`.
  - Or, `n > 1` and `R <:< Option[Product_n[T_1, ..., T_n]]`, for some
    types `T_1, ..., T_n`. The argument patterns `p_1, ..., p_n` are
    typed with expected types `T_1, ..., T_n`.

An `unapplySeq` method in an object `x` matches the pattern `x(p_1, ..., p_n)`
if it takes exactly one argument and its result type is of the form `Option[S]`,
where either:
  - `S` is a subtype of `Seq[U]` for some element type `U`, (set `m = 0`)
  - or `S` is a `ProductX[T_1, ..., T_m]` and `T_m <: Seq[U]` (`m <= n`).

The argument patterns `p_1, ..., p_n` are typed with expected types
`T_1, ..., T_m, U, ..., U`. Here, `U` is repeated `n-m` times.
Merge pull request #2051 from adriaanm/ticket-7039

SI-7039 unapplySeq result type independent of subpattern count