Event batching system rewrite. Should fix #236, #238, and implements the hybrid batching method (batch until frame or up/end event)