Don't waste CPU time reading canvas image in SDL_LockSurface().

This creates a new file, src/pre.js, which will be used for
customizing Emscripten Module settings for DOSBox. The --pre-js
argument is set from Makefile.am because putting it in LDFLAGS
breaks compilation of configure test scripts.
Disable X11 detection when building with Emscripten.

Emscripten now has X11 headers, but they are not needed or wanted
for DOSBox.
Change Emscripten optimization from -O2 to -O3.

Emscripten's -O3 optimization level used to apply unsafe
optimizations which made DOSBox not work. Now it instead applies
safe but expensive optimizations.