common/util: use ifstream to read from /proc files
refactor `collect_sys_info()` to use ifstream, getline and boost string
helpers to read and parse the /proc/meminfo and /proc/cpuinfo. for
better readability, and it's less error-prone.
Related-To: https://tracker.ceph.com/issues/43306
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
ecddb1dd24756b0049cf9d32fe49ae5d13f96b44)
Conflicts:
src/common/util.cc
- omitted modification of "mem_cgroup_limit" block which is not there in
mimic