Backport Redmine#5940: fix services_autorun for all agents

Include acceptance test.

Cherry picked from commits
- b672438c93711c904c0b38c751e4f9fbdf4449b8
- d70777771fb4434faeea042effc60d2e9a543ea6
- a0b0c255c5216fb943051c0fb39831cafc4e8d9d
- 049450fdf63f8bf3b1745fe877f66710580f667d

Conflicts:
	promises.cf
Redmine #5887: Fix incorrect package updates when server is unreachable

We restrict the regular expression even more to filter out error
messages and only keep real package information.

(cherry picked from commit 09eceeff504c4b92d447d37c7746f08ab51a48ea)

Conflicts:
	lib/3.7/packages.cf
Merge pull request #274 from vohi/redmine/5940-backport

Backport Redmine#5940: fix services_autorun for all agents