Added eventloop.
Added Destory() in tests to clean up event loop go routines at the end.
Merge pull request #20 from yifan-gu/event_loop

Replaced locks with eventloop.