tests: test if thread can block on error

wl_display_read_events() can make a thread wait until some other thread
ends reading. Normally it wakes up all threads after the reading is
done. But there's a place when it does not get to waking up the threads
- when an error occurs. This test reveals bug that can block programs.

If a thread is waiting in wl_display_read_events() and another thread
calls wl_display_read_events and the reading fails,
then the sleeping thread is not woken up. This is because
display_handle_error is using old pthread_cond instead of new
display->reader_cond, that was added along with wl_display_read_events().
client: drop unused event queue cond and list variables

The wl_event_queue cond variable has been replaced by the wl_display
reader_cond variable (commit 3c7e8bfbb4745315b7bcbf69fa746c3d6718c305).
This cond variable is never waited for anymore, just
signaled/broadcasted, and thus can be safely removed.

The wl_display event_queue_list can be removed as well, since it was
only used to iterate over the event queue list in order to broadcast
the now unused cond.

No regression on queue unit tests.

v2: rebased after 886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca
    added signed-off-by

Signed-off-by: Olivier Blin <olivier.blin@softathome.com>
Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
client: broadcast the right pthread_cond variable

In previous commit we removed unused variables. One of them was
pthread_cond_t that was formerly used when reading from display, but
later was (erroneously) made unused. This patch fixes this error
and is a fix for the failing test introduced few patches ago (tests:
test if thread can block on error)
tests: add tests for wl_display_cancel_read

Test if cancel read wokes up other threads.
tests: add test for reading after an error occurred

This test shows that it's possible to successfully call wl_display_prepare_read
and wl_display_read_events after an error occurred. That may lead to
deadlock.

When you call prepare read from two threads and then call read_events,
one thread get sleeping. The call from the other thread will return -1 and call
display_fatal_error, but since
we have already display->last_error set, the broadcast is not called and
the sleeping thread sleeps indefinitely.
client: check for error before prepare/read

This prevents from blocking shown in one display test. Also, it
makes sense to not proceed further in the code of these function
when an error occurred.