Redmine#5701: rename bin_dir to dir_bin for consistency with def.cf

(cherry picked from commit 1083dfa01c77756663106c5d2200a2c1acd4aa6c)
Redmine#5701: only set permissions for agents and optional_agents, not all of dir_bin

(cherry picked from commit 4f480df893885fabaf4201b2fc94211a1146fbec)
Redmine#5701: set recursive permissions for sys.workdir/bin if it is /var/cfengine/bin

(cherry picked from commit 40e00d159d4b650f1ebbb6d4baa55e7eb3aa4d16)
Add check to only run chkconfig if the service is registered

(cherry picked from commit 506797670792a2a151405351d8cea3fe917d24a0)

Conflicts:
	lib/3.7/services.cf