core: refactor loading machine-id and cache it

Previously, whenever we needed /etc/machine-id we would re-load it
from file. The are 3 downsides of that:

 - the smallest downside is the runtime overhead of repeatedly
   reading the file and parse it.

 - as we read it multiple times, it may change anytime. Most
   code in NetworkManager does not expect or handle a change of
   the machine-id.
   Generally, the admin should make sure that the machine-id is properly
   initialized before NetworkManager starts, and not change it. As such,
   a change of the machine-id should never happen in practice.
   But if it would change, we would get odd behaviors.
   It's better to pick the machine-id once, and rely to use the same
   one for the remainder of the program.
   If the admin wants to change the machine-id, NetworkManager must be
   restarted as well (in case the admin cares).
   Also, as we now only load it once, it makes sense to log and error
   (once) if we fail to read the machine-id.

 - previously, loading the machine-id could fail each time. And we
   have to somehow handle that error. It seems, the best thing what we
   anyway can do, is to log an error once and continue with a fake
   machine-id. Here we add a fake machine-id based on the boot-id,
   so, at least during a restart of NetworkManager (with invalid
   machine-id), the fake ID stays stable.

While at it, also refactor caching of the boot-id.
4 jobs for th/dhcp-client-id-mac-rh1640494 in 24 minutes and 11 seconds (queued for 6 seconds)
Status Job ID Name Coverage
  Test
passed #37099
allowed to fail
checkpatch

00:01:53

failed #37100
f28_build_default

00:08:40

failed #37101
f28_rpm_autotools_dbg

00:17:00

failed #37102
f28_rpm_meson_dbg

00:07:08

 
Name Stage Failure
failed
f28_rpm_meson_dbg Test
error: Bad exit status from /var/tmp/rpm-tmp.Fqvtqx (%build)


RPM build errors:
Macro expanded in comment on line 116: %{real_version_major}/%{name}-%{real_version}.tar.xz

Bad exit status from /var/tmp/rpm-tmp.Fqvtqx (%build)
ERROR: rpmbuild FAILED
ERROR: Job failed: exit code 1
failed
f28_build_default Test
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:16652: src/tests/src_tests_test_general-test-general.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/builds/NetworkManager/NetworkManager/build'
make[1]: *** [Makefile:17550: all-recursive] Error 1
make[1]: Leaving directory '/builds/NetworkManager/NetworkManager/build'
make: *** [Makefile:7318: all] Error 2
ERROR: Job failed: exit code 1
failed
f28_rpm_autotools_dbg Test
error: Bad exit status from /var/tmp/rpm-tmp.Ar3Qvf (%build)


RPM build errors:
Macro expanded in comment on line 116: %{real_version_major}/%{name}-%{real_version}.tar.xz

Bad exit status from /var/tmp/rpm-tmp.Ar3Qvf (%build)
ERROR: rpmbuild FAILED
ERROR: Job failed: exit code 1