Adds test cases for uncaught exception handling in GWTTestCase.

This patch also includes refactoring to share code in GWTTestCaseXXXTests.

Change-Id: I5dc3d37d0f49cce94cfe5494b0631a3f1ae463db
Review-Link: https://gwt-review.googlesource.com/#/c/1940/