1. Old worker terminatation machanism for daemon stop is not working
when job process hang.(Due to ticks doesn't work in job process run by
exec()) So, we use pid file to record job process's PPID then use it to
find job process's PID to send interupt singal to after we send temination
signal to worker.

2. set_time_limit() is also not a working machanism for worker timeout
solution when job process hang, so we create a array member to keep
worker timeout infomation. Each time when create or reap a worker, we
update it. And in the end of daemon while loop, we check this array
member to see if there is any worker reach the timeout standard. If so,
we send termination signal to that worker and interupt signal to the job
process that worker is executing to close that worker.

3. Before get fullpath of command for check sudo privillege, change dir
first to prevent 'which' command can't find command or script.

4. Add switch on and off functionality to log and db.

5. Minor bug fix.