fix testcase 1 of #1714, proper handling of resumeException, and remove hack in __cxa_begin_catch