ws: Clarify memory handling in get_machine_id()
ws: Clarify memory handling in get_machine_id()

Both g_strstrip() and g_strcanon() modify their argument in-place and
return the same pointer. But coverity does not know that:

```
Error: RESOURCE_LEAK (CWE-772): [#def28]
cockpit-237/src/ws/cockpitcertificate.c:62: alloc_arg: "g_file_get_contents" allocates memory that is stored into "content".
cockpit-237/src/ws/cockpitcertificate.c:63: noescape: Resource "content" is not freed or pointed-to in "g_strcanon".
cockpit-237/src/ws/cockpitcertificate.c:65: leaked_storage: Variable "content" going out of scope leaks the storage it points to.
```

And it's also rather uncommon for glib functions to do that. Clarify
and simplify the code to make it more obvious what's going on.

Part of https://bugzilla.redhat.com/show_bug.cgi?id=1938693

martinpitt/cockpit,cockpit-project/cockpit,martinpitt/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,garrett/cockpit,cockpit-project/cockpit,mvollmer/cockpit,cockpit-project/cockpit,garrett/cockpit,garrett/cockpit,mvollmer/cockpit,garrett/cockpit,mvollmer/cockpit,garrett/cockpit,mvollmer/cockpit,martinpitt/cockpit,martinpitt/cockpit,martinpitt/cockpit,mvollmer/cockpit