Use self pipes for signals.

So that the detail file "reply" code doesn't call the "read"
code from a child thread
Only use self pipes when threaded
Events are only managed by the main thread

event_new_fd() is now private.  There's a wrapper function
which takes care of adding the listener to a queue, and signalling
the main thread.
Lower connection limit in listener_free, and nowhere else
Fix build issues
Include NAS-IPv6-Address in Acct-Unique-Session-Id