Do not close stderr on daemon() when in log-target

Introduce a new ni_daemon_close_t bitmask to mark stdin, stdout, stderr and all fds to be closed, instead of using default closing of daemon().
In case of --log-target stderr is used, do not close that fd.