fix preventDefault being called after event has been replaced
remove no longer necessary preventDefault
EMCC_STDERR_FILE option, to log stderr in js compiler to a file
Merge pull request #1605 from juj/mingw32make_nmake_cmake

Mingw32make nmake cmake
Add functions for marshalling wchar_t (which is fixed 32-bit UTF32LE on Unix) strings to and from JS, and add a test.
Skip test_utf32 when on s_0_x since they don't link in libc, and the code relies on wcslen().
Rename utf32<->jsstring marshalling functions to UTF32ToString and stringToUTF32 following azakai's suggestion on naming convention.
Fix UTF32 <-> JS string conversion for non-BMP characters. Turns out JS string functions .length, .charCodeAt and .fromCharCode do not operate on Unicode code points, but UTF-16-encoded Unicode code units.
Update utf32 test to contain non-BMP characters in the test string.
Fix UTF-16 surrogate detection.
Add support for marshalling UTF-16 strings to/from JS. Allows passing wchar_t strings to JS when building with -fshort-wchar. Closes #1565.
handle flexible arrays at the end of structs, whose elements are themselves structs; fixes #1602
add space to emcc debug output
Add validate_asmjs.py tool to help unit-testing whether a build output is proper asm.js or not.
Add CMake helper function em_validate_asmjs_after_build() that adds an extra post-build step to project to confirm that the build output is valid asm.js.
Use em_validate_asmjs_after_build() in CMake test.
Use SPIDERMONKEY_ENGINE from ~/.emscripten in validate_asmjs.py as the primary source for locating SpiderMonkey. If it was not set appropriately, look from PATH.