wayland-server: Document wl_listener

This patch takes Kristian's comments into account, adding a demonstration and
giving a more thorough idea of how wl_listener is used.
utils: Reference some useful methods in wl_signal's doxygen

This commit adds a bit more detail on the lifecycle of a signal.
utils: Add doxygen for wayland-util.h

This is needed for doxygen to generate output for macro definitions, such
as wl_container_of, that are contained by this file. Classes like
wl_list would be documented regardless.
wayland-server: Improve wording for wl_signal_get's doc

The old description was a bit vague; this commit hopefully improves
describing what is returned.
doc: Include wayland-util.* for doxygen output

This commit creates a shared file list that is included by both the
client and the server for the XML Makefile targets, as classes within
util are used by both the client and the server.
doc: Create \comment alias for C-style comments

Since /* */ do not nest, documentation is forced to either use C++ style
// comments or some other foreign notation. This commit provides an alias
that allows C-style comments to be introduced in code blocks that support
aliases.

It should be noted that this macro will not work within \code blocks, as
Doxygen commands are ignored there. Instead, Doxygen's fenced code
blocks (created via ~~~) must be used for proper output. To demonstrate:

~~~
struct example_node {
        int id;
        \comment{Other members ...}
};
~~~

will roughly yield the following HTML (excluding syntax highlighting):

<pre>
struct example_node {
        int id;
        /* Other members ... */
};
</pre>
utils: Document wl_container_of
doc: Slight tweaks to wl_listener

Prefer \comment over // in code blocks for consistency's sake and keep
variable definitions separated by a line from the rest of the body.
client: fix an inconsistency in documentation

The errno is set to EAGAIN when there are undispatched events, according
to L1066 of wayland-client.c.
tests: extended message when leak in test is detected

When memory or fd leak is detected, print how many blocks of memory were
allocated and not freed, respectively how many files were opened/unclosed.
tests: add unit tests for wl_signal

Test wl_signal initialization, adding and getting listeners and emitting
tests: add wl_resource tests
Export the Wayland protocol XML file

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
configure.ac: Bump version to 1.2.91
client: Fix handling display->reader_count if poll fails

In wl_display_dispatch_queue, if poll fails then it would previously
return immediately and leak a reference in display->reader_count. Then
if the application ignores the error and tries to read again it will
block forever. This can happen for example if the poll fails with
EINTR which the application might consider to be a recoverable error.
This patch makes it cancel the read so the reader_count will be
decremented when poll fails.
configure.ac: Bump version to 1.2.92
scanner: Handle unrecognized invocation mode

Print usage if we don't recognize the invocation mode.  Also fixes
uninitialized variable warning.
configure.ac: Bump version to 1.3
protocol: Fix typo in documentation
wayland: Be consistent about #include-guard names

We had a mix of inconsistent names, some of which were non-conformant.
Standardize on all-uppercase-and-underscore naming convention.

https://bugs.freedesktop.org/show_bug.cgi?id=70679