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.

[Pekka Paalanen] Applied another hunk of Bryce's comments to docs,
	added libtool version bump.

Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
doc: Fix link to wl_list_remove()

Use function linking syntax instead of variable linking, to resolve two
warnings:

    wayland-server.h:167: warning: explicit link request to 'wl_list_remove' could not be resolved
    wayland-server.h:188: warning: explicit link request to 'wl_list_remove' could not be resolved

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
protocol: add repeat_info event to wl_keyboard

In the process wl_keyboard's version has been incremented. Given
clients get the wl_keyboard from wl_seat without a version, wl_seat's
version has also been incremented (wl_seat version 4 implies
wl_keyboard version 4).

earlier Acked-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
gitignore: Add another test-suite file

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
wayland-client: Fix indentation
server: Clean up socket destruction

The code here is wrong, leaky, and inconsistent. We don't free,
unlink or clean up things when we should in every error path.

Centralize the data destruction so it's easier to keep track of
and easier to bug fix.
server: Create the socket FD after taking the lock

We're going to split out the lock-taking to another function so we
can repetitively try locks.
server: Split out code to initialize the socket address for a display name

We'll use this to autodetect a good socket to open on.
server: Make get_socket_lock operate directly on the socket's lock_fd
server: Save the display name in the wl_socket

This allows us to return the display name to the client in a new API.
server: Add a simple API to find a good default display

This allows compositors to easily select a good display to listen on.
server: Remove deprecated functions