connection: Error out if file descriptor was not received

Otherwise the tail of fds_in buffer would just shift beyond the beginning.
That confuses the actual request handler and results in a crash further on
due to corrupted tail.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Add -pthread to AM_CFLAGS to do the right thing when using threads

https://bugs.freedesktop.org/show_bug.cgi?id=71633
tests: move test-runner into subdirectory

It's nice to keep helper sources separately from tests sources.
It's better for searching files as well as for extending
the test-suite.

Also, there were no need to compile each test with test-*.c files
so I used them to create noinst library and link the tests against it.
Now we don't need to attach test-runner files to each test sources.
tests: scanner

Scanner is program that crawles through given files and
copies out every definition/declaration marked by WL_EXPORT_TEST.
It saves these definitions into test-runner/tests-private.[ch]
 so these definition can be tested. Using the scanner guarantee testing of
current code of functions (contrary to manual copying from source file)
tests: add wl_buffer tests

Using scanner to have current code of wl_buffer_* static function,
test their behaviour