Fix a bug with multiple interleaved events in SimulatedEventLoop

The new test used to segfault, and now it works correctly.

Change-Id: I2dd35ee637f42d8ff926c508fa3872227fe6cdab
diff --git a/aos/events/event_loop.h b/aos/events/event_loop.h
index c36b195..81dfe42 100644
--- a/aos/events/event_loop.h
+++ b/aos/events/event_loop.h
@@ -676,6 +676,7 @@
   void ReserveEvents();
 
   std::vector<EventLoopEvent *> events_;
+  size_t event_generation_ = 1;
 
   // If true, don't send AOS_LOG to /aos
   bool skip_logger_ = false;