MetaShapedTexture: don't include private headers in public ones

Private headers are not installed, so they can't be referenced
from public ones.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
build: make wayland support unconditional

In the wayland branch of mutter, we want to build a wayland version
of the mutter libraries, and that's much easier if we just build
wayland support unconditionally.
The define is kept to avoid a huge diff, but should be removed
in a later patch.
Also, wayland support can still be disable at runtime, by
launching mutter without the --nested switch.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
Remove HAVE_WAYLAND ifdefs

Wayland support is always enabled now.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
Remove files no one cares about anymore

mutter-plugins.pc has been replaced by libmutter.pc, and the
wm properties in the control center are long gone.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
wayland: make parallel installable with regular mutter

Modify all visible instances of mutter with mutter-wayland
(libraries, folders, pkgconfig, etc.), so that the wayland
branch can be installed alongside the usual X11 mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705497
ui: restrict gtk to only use the x11 backend

We use GTK as a way to get the X11 connection for our internal
use, so we need it to keep using X.

https://bugzilla.gnome.org/show_bug.cgi?id=706303
MetaWayland: install an X io error handler

This way can detect X disconnections correctly, crash with a core
dump and reset the tty.
wayland: import weston-launch setuid launcher

To run mutter as a display server, one needs to acquire and
release the DRM master, which is only possible for root, so
we take advantage of weston-launch, a small setuid helper binary
written for the weston project. We import our own slightly
modified copy of it, because weston-launch only launches weston,
for security reasons.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
mutter-launch: simplify by removing features we don't need

Remove the ability to launch as a different user, which we don't
need because we're spawned by gdm or by the user manually on the
command line.
With that, we can also remove "security" checks.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
mutter-launch: make sure that the spawned binaries sees the right libraries

Being a setuid binary, our LD_LIBRARY_PATH is cleared by glibc at
startup, but we need the spawned binary to see it, otherwise
jhbuild doesn't work, so hardcode it using the configured libdir.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
wayland: add TTY and DRM master management

Now that we have a setuid launcher binary, we can make use of
using the standard weston-launch protocol, through the socket
we're passed at startup.
We also add TTY management, to ensure the keyboard is in the
correct mode and the VT switching is in our control.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
wayland: add input device handling through mutter-launch

Use the new hook in clutter-evdev to ask mutter-launch for the
FDs of the input devices we need.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
Improve handling while VT switched

When we don't have the DRM master, there is absolutely nothing
we can do (no event processing, no video output), so emulate
the old X DRM lock with a nested GMainContext without sources.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
Add keybindings for switching VTs

Once mutter is started from weston-launch on its own VT, there is
no way to change VT again (for example to actually start an application),
because the keyboard is put in raw mode.
So introduce some keybindings mimicking the standard X ones (Ctrl+Alt+Fn)
that switch the VT manually when activated.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
Fix handling SIGTERM while DRM-locked

And at the same time, clean up the signal handling in the regular
case.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
Add a crash handler to restore the TTY and keyboard mode

If mutter crashes on secondary VT, it leaves you with a raw keyboard
that doesn't switch with Alt+FN and no way to get out. At least,
let's provide a decent error message that we crash and let's
restore everything to sane defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
MetaWayland: redirect stdin/stdout/stderr when running on bare metal

We need to spawn background processes for gnome-session and friends,
so we need to make sure they don't try to read or write from our
terminal.

https://bugzilla.gnome.org/show_bug.cgi?id=705861
MetaWaylandKeyboard: use the new clutter-evdev support for xkbcommon

We need to track the full xkb_state to have the necessary information
to send to the clients, otherwise they may get confused and lock
or invert the modifiers. In the evdev backend, we just retrieve the
same state object that clutter is using, while in the other backends
we fake the state using what clutter is providing (which is a subset
of what X11 provides, which would be necessary to have full state)

https://bugzilla.gnome.org/show_bug.cgi?id=705862
wayland: fix a compiler warning

Implicit declaration of memset
Add MetaCursorTracker, a new helper for tracking the cursor sprite

Under X, we need to use XFixes to watch the cursor changing, while
on wayland, we're in charge of setting and painting the cursor.
MetaCursorTracker provides the abstraction layer for gnome-shell,
which can thus drop ShellXFixesCursor. In the future, it may grow
the ability to watch for pointer position too, especially if
CursorEvents are added to the next version of XInput2, and thus
it would also replace the PointerWatcher we use for gnome-shell's
magnifier.

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