Close all FDs inherited from previous processes when forking to enter daemon mode

When redis is started from php/apache it inherits all open file descriptors of apache/php, which creates a problem when stopping apache - the FDs, including connections to apache ports (80, 443,...),  remain in use by redis and apache can't get restarted without stopping redis.
This patch closes all open file descriptors inherited from any process when going into daemon mode.