Give mdadm format uuids to the outside world (#1156202)

Resolves: fed#1156202

We need our uuids obtained from mdadm to be the canonical format internally,
as we need to compare them to other UUIDs obtained from other sources,
which are in canonical form.

But the outside world needs to see mdadm's own format UUIDs.

Hence, we need a conversion function to convert from canonical UUIDs to
mdadm format UUIDs.

There is an MDRaidArrayDevice property, mdadmFormatUUID, which invokes
the conversion function. It returns None if the uuid is unconvertable.

This property is substituted for uuid wherever appropriate.
If some checking was done for presence of UUID in these contexts, do
appropriate checking for availability of formattedUUID. Where no
checking was done previously, do not insert checking.

In one location, use context manager for writing to a file, for neatness,
since the code has to be touched anyway.

Signed-off-by: mulhern <amulhern@redhat.com>
Add testing for MDRaidArrayDevice.mdadmFormatUUID (#1156202)

Related: fed#1156202

Signed-off-by: mulhern <amulhern@redhat.com>