use poll() to find open fds, removes malloc() after fork()

Resolves issue #173: libdbus calls malloc() after fork(), causing clients to
deadlock

calling malloc() after fork is undefined behaviour if the process
multi-threaded. The new code is a commonly used performance workaround for
the fork-and-close pattern and uses only async-signal safe functions. See
signal-safety(7).
11 jobs for poll in 10 minutes and 32 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Build
passed #4630393
build:cmake

00:05:56

passed #4630390
build:debug

00:10:32

manual #4630395
allowed to fail manual
build:i686-w64-mingw32-cmake
passed #4630394
build:i686-w64-mingw32-debug

00:04:04

manual #4630392
allowed to fail manual
build:legacy
passed #4630389
build:production

00:07:39

manual #4630391
allowed to fail manual
build:reduced
manual #4630398
allowed to fail manual
build:stretch
passed #4630396
build:x86_64-w64-mingw32

00:06:01

passed #4630397
build:x86_64-w64-mingw32-cmake-debug

00:07:00

manual #4630399
allowed to fail manual
build:xenial