client: extend error handling

When an error occurs, wl_display_get_error() does not
provide any way of getting know if it was a local error or if it was
an error event, respectively what object caused the error and what
the error was.

This patch introduces a new function wl_display_get_protocol_error()
which will return error code, interface and id of the object that
generated the error.
wl_display_get_error() will work the same way as before.

wl_display_get_protocol_error() DOES NOT indicate that a non-protocol
error happened. It returns valid information only in that case that
(protocol) error occurred, so it should be used after calling
wl_display_get_error() with positive result.

Thanks to Pekka Paalanen <ppaalanen@gmail.com> for pointing out
issues in the first versions of this patch.
tests: add test-compositor

This patch introduces a set of functions that will create a display
and clients for tests. It can be used in tests like this:

  void
  client_main()
  {
  	struct wl_display *d = wl_display_connect(NULL);
  	...
  	...
  	wl_display_disconnect(d);
  }

  TEST(display_tst)
  {
    struct display *d = display_create();

    wl_global_create(d->wl_display, ...);
    ...

    create_client(d, client_main);
    display_run();

    /* will run both clients at the same time */
    create_client(d, client_main);
    create_client(d, client_main2);
    display_run();

    display_destroy(d);
  }
tests: use test-compositor in queue-test
saviour
display stop/resume