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.
then how about having multiple params? `(fps, swap_interval, as_fast_as_possible)` Old code will not build and will need to be updated with 0 in the other params.