bin/ebuild-ipc.py: use threading if available

If threading is available then use a thread instead of a fork for
writing to the fifo. This has the advantage of avoiding a possible
python futex deadlock following fork as reported in bug #524328.

X-Gentoo-Bug: 524328
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524328