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.
We need to make these `double` instead of `int`, since CSS pixel size can be fractional and sometimes one needs to set a fractional pixel size in order to 1:1 match CSS pixels to WebGL canvas render target pixels.