Factored the poll backend out of GMainContext

Defined GMainContextFuncs, the backend vtable for
pluggable main loop implementations.
The new constructor g_main_context_new_custom() can be used
to create contexts with custom backends (and is used internally
for built-in backends).

This first backend, made largely from the existing code, is special
in another way: the methods of GMainContext that were designed around
GPollFunc will be only supported by the poll backend.
The context will switch to the poll backend to complete
any of these functions.