Medium: services: Improve the performance of synchronous actions

The synchronous actions such as fetching RA meta-data are not efficient.
It's very usual that such actions take more than 1 second. This commit
improves the performance.

Based on the work from Lidong Zhong <lzhong@suse.com>
Merge remote-tracking branch 'origin/pr/263'

Conflicts:
	lib/services/services_linux.c
Log: xml: Correctly indent xml elements
Fix: Ensure custom error codes are less than 256
Fix: cib: Use unique error codes for write_cib_contents()