add api useful for handling HiDPI

With this you can do something like:
```
double ratio = emscripten_get_device_pixel_ratio();
emscripten_set_canvas_size(w * ratio, h * ratio);
emscripten_set_canvas_css_size(w, h);
```
to get HiDPI webgl.
Yes, we normally always pull in Browser, so this would force us to include JSEvents as well, which is not great. Let the C API calls depend on JSEvents directly, if that's possible.