pattern matching efficiency: addresses SI-6686 and SI-6941, affects SI-5739

- don't do null check when we know we've just done a type test
- don't store subpatterns bound to underscore in local val
  - note 1: under -optimize this is only done when correctness mandates it for mutable fields
  - note 2: mutable fields in case classes nested in the scala package are assumed not to be mutated by public methods, so that we don't have to store them (specifically for ::) --> this affects SI-5739
- eliminate local vals storing subpatterns when the vals aren't referenced  (their rhs's side-effect is not guaranteed anyway, and normally not observable)
- eliminate primitive value class type test when we statically know it can't fail
- test all this at the bytecode level by comparing bytecode of a match and the equivalent if/then/else/isInstanceOf/asInstanceOf/equals/...

review by @gkossakowski, @retronym