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: 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
tests: add event-test

This test is taken from weston, just changed to work with mutter
tests: add button-test

This test is taken from weston. Basically, it's the same as in plugin
test send_key_tst, but in order of adding testcases, it's not bad to
have it in another file
tests: add bad-buffer-test

from weston
tests: support for installed-tests

see: https://wiki.gnome.org/GnomeGoals/InstalledTests
test-runner: add timeout

Kill test after 10 second (by default). It can be changed
by environment variable MUTTER_TEST_TIMEOUT=n where n is
timeout in seconds. If n is 0, then timeout is turned off.