[IR] Fix broken handling of non-ruby (java) exceptions.

* While running MRI tests, occasionally, ran into problems with
  $! not being set properly. Narrowed it down to when a java
  exception was being raised (StackOverflow, NullPointer, etc.)
  which wasn't being handled properly.

* Cleaned out existing code and reused AST code that distinguished
  between Ruby and Java exceptions. In the process, $! is now
  set whenever a Java exception is encountered.

* Now, MRI tests run without crashing.