Move gwt-incompatible methods to Platform, add a gwt-compatible stub, and fix up the tests.

Also add a test to the GWT suite that exercises the code path in question.