build-sys: add -pthread flag for libsystemd-shared

src/shared/async.c uses pthread so it will fail at link time if we link
only to libsystemd-shared and use async
tests: add test-capability
tests: add test-async
tests: add test_fdset_remove
consistently order cleanup attribute before type