Added experimental support for using EventMachine and EventMachine::Synchrony based apps

The periodic worker was not compatible with these.

Replaced the `run_periodically` logic with a simple `EventMachine.add_periodic_timer`