x11: add XKB protocol keymap and state creation support

These are function to create an xkb_keymap directly from XKB requests
to the X server. This opens up the possibility for X clients to use
xcb + xcb-xkb + xkbcommon as a proper replacement for Xlib + xkbfile for
keyboard support.

The X11 support must be enabled with --enable-x11 for now.
The functions are in xkbcommon/xkbcommon-x11.h. It depends on a recent
libxcb with xkb enabled. The functions are in a new libxkbcommon-x11.so,
with a new pkg-config file, etc. so that the packages may be split, and
libxkbcommon.so itself remains dependency-free.

Why not just use the RMLVO that the server puts in the _XKB_RULES_NAMES
property? This does not account for custom keymaps, on-the-fly keymap
modifications, remote clients, etc., so is not a proper solution in
practice. Also, some servers don't even set it. Now, the client just
needs to recreate the keymap in response to a change in the server's
keymap (as Xlib clients do with XRefreshKeyboardMapping() and friends).

Signed-off-by: Ran Benita <ran234@gmail.com>
x11: add a couple of tests

Add two tests:

    ./test/interactive-x11
which is like test/interactive-evdev, but should behave exactly like your
X keyboard and react to state and keymap changes - in other words, just
like typing in xterm. Press ESC to exit.

    ./test/x11
which currently should only print out the same keymap as
    xkbcomp $DISPLAY out.xkb
(modulo some whitespace and some constructs we do not support.)

Signed-off-by: Ran Benita <ran234@gmail.com>
build: add configure summary

Signed-off-by: Ran Benita <ran234@gmail.com>
Update NEWS

Signed-off-by: Ran Benita <ran234@gmail.com>
Update README

- Remove outdated information about API/ABI stability. If we ever break
  API or ABI, we'll do a major release. But currently everything is
  stable.

- Remove outdated warnings about internal symbols. You simply cannot
  access them...

- Briefly mention xkbcommon-x11 existence.

- Update git and bug URLs.

- Add myself as maintainer :)

Signed-off-by: Ran Benita <ran234@gmail.com>
Bump version to 0.4.0

Signed-off-by: Ran Benita <ran234@gmail.com>
build: some fixes in configure.ac

- Use 'test =' instead of 'test ==' in the x11 test. The second one
  might not work with e.g. dash, whoops.

- Use AS_IF instead of 'if'. It actually blends in better..

Signed-off-by: Ran Benita <ran234@gmail.com>
Use secure_getenv when available

We probably don't want to get a privileged process to compile arbitrary
keymaps. So we should be careful about the envvars which control include
paths or default RMLVOs. But then secure_getenv is more sensible for
everything we do.

Signed-off-by: Ran Benita <ran234@gmail.com>
x11: add missing #ifdef __cplusplus to header

Signed-off-by: Ran Benita <ran234@gmail.com>
test: don't print control characters in interactive tests

Signed-off-by: Ran Benita <ran234@gmail.com>