Stop using *Critical functions in throwIOException

This was a bug, wherein upon throwing an exception, we would try to
allocate memory for the message - all while holding a critical
reference to the jbyteArray representing the exception string.  This
caused an expect to fail in allocate3.