server: check for client state in destroy()

check if client exited with 0 exit status in wit_display_destroy()
Easiest way how to check it..
core: add wit-global.c file

The source of new helper library. There will be function used by both
client and the server in it.
core: add libwit-global

libwit-global.la which is (will be) library containing functions
used by both client and the display. The name is related to wit-global.h
but maybe it will be renamed later to something like wit-ipc or
wit-util.
tests: link them against libwit-global
client: use asswrite in send_display

The code is shorter and nicer
global: add new optypes and function prototypes

BARRIER, SEND_BYTES and asswrite
server: add indicator that request was catched
server: change approach

Until now, after the wit_display_run() you couldn't do anything
until it stopped running and the requests from display were handled
in sigusr1 handler. From know the sigusr1 handler only terminates the
display and the client's request is handled in new function
wit_display_process_request(). It allows us some cool new features
like a barrier or display code being run after the client is started.

So the code will look like:
client_main() {
    ...
    wit_client_call_user_func();
    wit_client_ask_for_events();
    ...
}

display_code() {
   wit_display_run();

   /* we know what client will do, so we can
    * explicitly invoke process_request() */
   wit_display_process_request(); // user func
   wit_display_process_request(); // emit events

}
server: make wit_display_process_request public
client: use new approach in requests

The new approach is described in the previous commit.
In short: display will handle the requests manually (not in signal
handler) and each request will be acknowledged.
client: change header

make wit_client_barrier public and wit_client_ask_for_events now returns
number of events which were emitted by the display
server: use asswrite in send client

instead of write && assert
server: delete wit_display_barrier function

It was not used, the same functionality is provided by process_request
server: user _exit instead of exit in sighandler

_exit is async safe function (see man 7 signal)
core: add break in switch after barrier
tests: event-test updated

Failing, though. There are not tested all new resources, but everything
else works
tests: wit-test updated

to comply with new approach
test: add new tests

Add pointer-test. It is not sophisticated, but I'd like to extend it
later