Fix: don't use daemon() to daemonize

This is done because now we can control when the parent should return
from the fork(). With this patch, it only returns when the session
daemon is ready to operate meaning it can receive commands.

The daemonize process for the child mimicks daemon(3) as in it sets the
setsid, chdir to / and dup 0, 1 and 2 into /dev/null.

Signed-off-by: David Goulet <dgoulet@efficios.com>