Fix a bug that daemonize doesn't work on OS X

We can't use kqueue() -> fork() -> kevent() sequence.
This change changes the sequence to fork() -> kqueue() -> kevent().

Why does this change introduce notification by pipe? Because we want
to avild the following shell scirpt:

    groonga --protocol http -d ${DB_PATH}
    sleep 3
    curl http://localhost:10041/d/status

We want to keep that "groonga command is retruned" means "groonga
server is readay".

[groonga-dev,01440]

Reported by Masahiro KONISHI. Thanks!!!