Factored out the poll-centric API support functions

The methods of GMainContext that assume it is backed by a GPollFunc
will be supported only by the poll backend. The context will switch
to the poll backend to complete any of these functions.