Fix an issue with changed return types from element measurements

We ran into an exception when running the ace library in Dartium 36. Unfortunately I don't have the stack trace handy, but the issue is that many of the return types from measuring elements have changed from `int`s to `double`s. We've fixed several exceptions in Spark related to this; this fixes the one that I've seen in ace (for `EditSession.screenLength`).

I added a test. It passes w/ or without the fix. The ace tests always run in JS - I think you'd have to run them in Dartium to see the issue. I temporarily swapped them over to running natively in Dart - the test still passes as the value returned from the unit test is `6` - a valid int. In any case, FYI -