Adding python docs to utils/daemon.py
Remove unested code in utils/daemon.py with small refactoring

Note: there are still unested code here, but it's only the forking,
which is required (at least without doing considerably more changes with
no practical benefit, since sphinx is happy with this file as it is).