A simple test for polling on a file-like descriptor

https://bugzilla.gnome.org/show_bug.cgi?id=699132
glib/tests/mainloop: Acquire the context while asserting its state

The iteration methods presume that the context is acquired.

https://bugzilla.gnome.org/show_bug.cgi?id=699132