Main loop scheduling

Two changes:
  - Fixes a bug where calling `emscripten_set_main_loop` with fps=0 in a sequence with `emscripten_cancel_main_loop` would not properly cancel the previous loops, but the rAF timers would stack up, calling the main tick function at a too fast rate.
  - Adds support for controlling swap interval as an Emscripten-native API, and in EGL, GLFW and SDL.
isn't this inconsistent with `set_main_loop`? there 0 means rAF, and there is no option to run as fast as possible.

do we need this 'as fast as possible'? if so then maybe we need to add it in all places?