analyze extractor type test, drop redundant null check

pattern matching on case classes where the scrutinee
is not known to be a subclass of the pattern type
would result in code like:

```
if (x1.isInstanceOf[Foo]) {
  val x2 = x1.asInstanceOf[Foo]
  if (x2 != null) {
    ...
  }
}
```

this wastes byte code on the redundant null check
with this patch, it's no longer emitted when
previous type tests imply the variable cannot be null
don't store subpats bound to underscore
skip test if static type <:< expected *primitive value class*
SI-6686 drop valdef unused in flatMapCond's block