T21: When integrating with external mainloop via callbacks, need to poll() twice
Description
Originally reported by migration: https://bugs.libssh.org/T21
When we use channel callbacks to handle data/eof/etc. in an async program with a main loop ... we add the file descriptor returned by ssh//get//fd() to the external main loop (in this case GLib). Once we get a POLLIN or POLLOUT from our external main loop, we have to use ssh//events//dopoll() to ask libssh to poll() once again.
This results in a needless call to poll() and twice the context switches.