mainloop: implement gio_poll_dispatch_mod

libqb may need to modify the events or dispatch function for a
previously-added poll source.
Merge pull request #537 from AnchorCat/mainloop

mainloop: implement gio_poll_dispatch_mod