Fix compatibilty with latest Sequel + better use of EventMachine

Sequel changed internal api of ConnectionPool at 3.41.0. Patch should be compatible both with previous version and the latest one.

Use EventMachine for consuming all input instead of calling conn.block, which blocks EventMachine.