tests: introduce mutter-test plugin

This plugin will create wl_test global in mutter and will provide
basic testing capabilities
test plugin: add wl_test global

Create wl_test global in init function and set up binding
events: remove static keyword from meta_display_handle_event

Make it 'public' but do not add it into any header file (thus it must
be declared before using). Let use it only those, who know that :)
I need it in tests.
test plugin: add wl_test implementation

Implement requests for wl_test object
test plugin: get pipe from parent

When mutter-wayland is spawned by test, then the test needs wait
until mutter is fully initialized.
In order of achieving that use pipe that is passed from
the test (parent process) to mutter (child process) in environment.

This patch covers mutter side - get pipe fd and notify parent when mutter
is ready.
tests: add code for creating and running tests

use mixture of wayland's test suite and glib (save list of tests in special
section and run them using glib)
There are two types of tests (due to efficency):
TEST(test_name) is usual test that do not need mutter and
MUTTER_TEST(test_name) is test that will be run along with mutter
Also, each of these types has FAIL variant, that suppose that the
test should fail.
tests: affect spawning mutter by environment variable

Environment variable MUTTER_TEST_SPAWN_MUTTER will affect spawning
mutter during test in following way:
if it's set to "none" or "0", then mutter won't be spawned at all
if it's set to "once" or "1", then mutter will run only in one instance
for all testcases in test (normally is one mutter instance
spawned for each test case MUTTER_TEST or MUTTER_FAIL_TEST)
tests: add weston tests helper

Add pre-defined functions for tests from weston
tests: make weston-test-helper work with mutter

Mutter windows are created via xdg_shell. Bind to xdg_shell and
create xdg_surface in client_create() function. Also remove dependency
on weston files.
weston-test-helpers: change coding style

We agreen on fully adopting this file, therefore change coding style.
weston-test-helpers: use glib functions

Continue adopting. Replace standard functions with their glib alternatives
(free -> g_free, strcmp ->g_strcmp, xzalloc -> g_new0, ...)
tests: add mutter-test.xml protocol

This protocol contains requests end events specific for mutter tests
test-plugin: add weston-compatible mode

create mutter_test global, but only when the plugin is in
weston-compatible mode. Also handle requests differently when
the plugin is to be compatible with weston.
keyboard: let event to be propagated from grab handler

If it's not propagated, then clutter won't emit the "event" signal
in the case of CLUTTER_KEY_PRESS and CLUTTER_KEY_RELEASE events.
test helpers: catch mutter_test events

Catch these events and set flags accordingly. The flags are not reseted
by default so user (when he wants check the state) must take care of
reseting the flag before using it
test helpers: add wrapper functions for wl_test requests

add:
  move_pointer ()
  send_button ()
  send_key ()

Each of these functions send the requests and waits for
answer from mutter that the request has been processed
(when not in weston-compatible mode. In that case they
do roundtrip)
tests: create xdg-shell-client-protocol.h for tests

Client headers have been removed recently, but we need this one in tests
weston-test-helpers: add xdg_shell and xdg_surface handling

handle xdg_* events
tests: add sanity tests

few environment tests
tests: add plugin-test

tests for test plugin