event_machine: refactor async.callback for keepalive