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

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

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
11 jobs for poll in 10 minutes and 32 seconds (queued for 3 seconds)