[lib] add seaf_daemonize

- left to test
- refer to [daemon(3)](https://github.com/freebsd/freebsd/blob/master/lib/libc/gen/daemon.c#L45-L95) in libc (which is shipped with a BSD variant) for convenience