Fix #1343: Add a RetryingComJSEnv and use it for CI

Don't use `getSimpleName` in Scala, it's a bit fragile (it crashes for some cases of inner classes). Use `getName` instead.