add graceful shutdown to gearman server & add comments for all the files