ppb_flash_message_loop_run: handle invalid resource
add locking to tables.c
ppb_core_call_on_main_thread: add timed event queue