Fix IR type of parameters in JavaScript functions.
Fix IR type of () -> undefined conversion.
Fix the IR type of matches in statement position.
Fix IR type of .asInstanceOf[Null/Nothing].
Merge pull request #645 from sjrd/fix-ir-types

More fixes to IR types