events: Make sure to check the event window of the MapNotify

This was lost in a rebase when killing off zaphod mode.
window: Ensure that visible_to_compositor is set when unmanaging

visible_to_compositor should always be in sync with show_window /
hide_window calls, even when unmananging.

This fixes a crash where we call sync_window_state when the window
is unmanaging, since we use visible_to_compositor to determine whether
the compositor will crash.

This is actually wrong; we should be using the knowledge about
whether we have called add_window / remove_window. We'll introduce
this with a new boolean next time.
window: Track known_to_compositor and visible_to_compositor separately

Really, visible_to_compositor means that the window is shown, e.g.
not minimized. We need to be using a boolean tracking whether we've
called meta_compositor_add_window / meta_compositor_remove_window.

This fixes a jump during window placement when a window appears.
display: Don't double-free the screen

We already free the screen once in meta_display_close.

This fixes a crash when trying to restart mutter.
window-actor: Fix the input shape region for decorated X11 windows

The code here before was completely wrong. Not only did it mix up
coordinate spaces of "client rect" vs. "frame rect", but it used
meta_frame_get_frame_bounds, which is specifically for the *visible*
bounds of a window!

In the case that we don't have a bounding or input shape region at
all on the client window, the input shape that we should apply is
the surface's natural shape. So, set the region to NULL to get the
natural rect picking semantics.
Rename the monitor backend filenames

To match the "meta-*" new-style naming.
Move monitor manager headers to their own files

Instead of having them in monitor-private.h.

This way, it's easier to move our own backend when the chance arises.
Kill meta_ui_add_event_func / remove_event_func

The reason we don't simply use gdk_window_add_filter directly is
because of some twisted idea that any GDK symbol being used from
core/ is a layer violation. While we certainly want to keep any
serious GDK code out of ui/, event handling is quite important
to have in core/, so simply use a GDK event filter directly.
idle-monitor: Rearrange code to make it a cleaner split

We're going to push this to be subclasses soon.
idle-monitor: Split the DBus implementation to a separate file
idle-monitor: Move reset_idletime handling to events.c

It's not specific to the Wayland protocol at all, and it's not really
a Wayland compositor thing. This should eventually be in the native
backend.
idle-monitor: Create separate subtypes for backend-specific idle monitors

The separation here isn't 100% clean yet, as there's common
parts that are still protocol specific. We'll clean that up
in the next commit.
idle-monitor: Move watch implementations to be private to the subclass
idle-monitor: Move the alarms field to the XSync backend

For whatever reason, this hash table was in the generic
implementation section instead of the XSync implementation,
even though it's only used by the XSync implementation.

Use it as a first pass of things to move over.
idle-monitor: Kill off an unused field
idle-monitor: Make the rest of the implementation-specific fields private
cursor-tracker: Kill off an unused include
cursor-tracker: Remove unused constants
cursor-tracker: Shadowing is bad, don't do it
cursor-tracker: Add a comment about what previous is

It confused me a bit.