Made persist be synchronized

Now, it can be called by multiple threads at the same time!
The actual recording now happens in a separate thread

To get it over with quickly so it can accept new events to process.