Rename wl_debug to debug_server/client

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Make default log handler print to stderr

On the client side we log fatal errors before we exit.  If a client doesn't
set a log handler, it's hard to figure out what goes wrong.
client: Rename display->queue to default_queue

We'll add a new queue next, so rename the default queue first.
client: Queue display events on private queue and always dispatch

The wl_display events (error and delete_id) need to be handled even
if the default queue doesn't get dispatched for a while.  For example,
a busy EGL rendering loop hits wl_display.sync every eglSwapBuffers()
and we need to process the delete_id events to maintain the object ID
data structure.

As it is, that doesn't happen, but with this change we special case
wl_display events.  We put them on a custom, private queue and when
dispatching events, we always dispatch display_queue events first.
The wl_display proxy should still be the default_queue, so that objects
created from wl_display requests get assigned to that.
protocol: when buffer transform and scale change

Clarify when the pending and current buffer transform and scale values
change, and what exactly happens on commit.

This matches what Weston currently does.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
wayland-client: Set a proper errno

errno is supposed to be positive, not negative. It seems that
everything else that calls display_fatal_error() calls it with
a positive error code, so do it here as well.
scanner: Add GCC pragmas to disable -Wredundant-decls

The code very intentionally emits a lot of redundant declarations
to simplify the scanner code. Somebody building with -Wredundant-decls
would have compile errors, so emit special pragmas to turn those
warnings off.

These pragmas should be ignored outside of gcc/clang.
connection: Use wl_log to report errors

In some cases, like Xwayland, stdout and stderr are redirected to
/dev/null, losing us valuable information, while wl_log can be
overridden, allowing us to send it to a log file instead. This
can help debugging immensely.
build: Stop using xmllint to validate protocol files

Same reason as commit cd31275f28b0a04d2ec5426dc81e875197b47e52 from weston:

    The scanner needs to be good enough.  If it crashes or fails to report
    invalid input, that needs to get fixed.
build: Move protocol/ Makefile.am into toplevel Makefile.am

A small step towards non-recursive build system for wayland too.