use EM_ASM_* macros instead of inline assembly

 * the EM_ASM_INT() macros are new
 * should make our code (almost) asm.js compatible
added function PDC_emscripten_set_handler() to set a key handling callback

more efficient than polling for key events using emscripten_set_main_loop()
link examples with -O2
minor simplification