Create a stub class and singleton to represent main

This is an updated patch from pull request #16 which will throw an
exception if coro is called without starting the event_loop(). The
main update is to bring it up to date with recent changes and make
the linux poller throw the correct exception in this case.
Update and fix socket test