cmdlib.sh: Move daemon functions to daemonlib.sh

Move the daemon start/stop functions to separate daemonlib.sh library.

Add documentation to test-writing-guidelines

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>