Fix a bug that daemonize doesn't work on OS X
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!!!

redfigure/groonga,kenhys/groonga,cosmo0920/groonga,komainu8/groonga,groonga/groonga,redfigure/groonga,groonga/groonga,komainu8/groonga,kenhys/groonga,cosmo0920/groonga,redfigure/groonga,hiroyuki-sato/groonga,myokoym/groonga,groonga/groonga,myokoym/groonga,naoa/groonga,groonga/groonga,redfigure/groonga,myokoym/groonga,redfigure/groonga,naoa/groonga,myokoym/groonga,kenhys/groonga,myokoym/groonga,myokoym/groonga,groonga/groonga,groonga/groonga,hiroyuki-sato/groonga,naoa/groonga,cosmo0920/groonga,naoa/groonga,naoa/groonga,kenhys/groonga,naoa/groonga,kenhys/groonga,redfigure/groonga,myokoym/groonga,hiroyuki-sato/groonga,kenhys/groonga,cosmo0920/groonga,komainu8/groonga,groonga/groonga,komainu8/groonga,hiroyuki-sato/groonga,komainu8/groonga,kenhys/groonga,myokoym/groonga,cosmo0920/groonga,komainu8/groonga,kenhys/groonga,hiroyuki-sato/groonga,komainu8/groonga,cosmo0920/groonga,hiroyuki-sato/groonga,komainu8/groonga,hiroyuki-sato/groonga,hiroyuki-sato/groonga,cosmo0920/groonga,naoa/groonga,groonga/groonga,redfigure/groonga,redfigure/groonga,cosmo0920/groonga,naoa/groonga