Record monitor connect/disconnect events.

Each time we receive an XEvent we diff the list of currently connected
monitors with the list of previously connected monitors. Any
differences are recorded using the event recorder API. It is possible
that there will be no differences to record because XEvents are sent
for more events than just monitor connects and disconnects.

[endlessm/eos-sdk#635]
Actually, this optimization causes a crash because `g_variant_new` expects a `GVariantBuilder *` for an array of unsigned bytes ("ay"). Switching back to the original implementation. If `GVariantBuilder` is really inefficient, I think we should fix this upstream.