Gets the poll function set by set_poll_func.
a MainContext (if null, the global-default main context will be used)
the poll function