Optimize Emscripten SDL handwritten JS-implemented SDL_LockSurface() and SDL_UnlockSurface() by adding an option to perform discarding locks that are fast no-ops and to avoid the screen-is-always-opaque emulation which fills alpha=0xFF bytes to each pixel on lock and unlock. Call something like EM_ASM("SDL.defaults.copyOnLock = false; SDL.defaults.discardOnLock = true; SDL.defaults.opaqueFrontBuffer = false;"); at startup to enable these.
Merge pull request #2870 from juj/sdl_surface_lock_opts

Sdl surface lock optimizations.