src/main: fix primary slot handling for rauc status
src/main: fix primary slot handling for rauc status

So far primary slot handling was a little too simply as we only created
a dummy slot that got just a name assigned.
This is obviously insufficient when being used together witht the new
features that the 'Actviated: ' entry in rauc status now also shows the
'bootname' property of the primary slot.

Moving retrieve_slot_states_via_dbus() into retrieve_status_via_dbus()
comes with several benefits:
At the high level (from rauc status cmdline handling) we only need to
call a single function now.
Concerning primary slot handling, we now can first populate the basic
information while keeping the primary slot reference empty for now, then
we obtain the list of all slots and their status, and finally we can
assign the valid slot reference to primary by looking it up in the slots
hash table.

This way we have both a cleaner code and now a pointer to a full and
valid primary slot instance.

Signed-off-by: Enrico Jorns <a2e5f936c390f36494e46e71bcfbe365bb1e8c49@pengutronix.de>

ejoerns/rauc,ejoerns/rauc,rauc/rauc,jluebbe/rauc,rauc/rauc,rauc/rauc,ejoerns/rauc,jluebbe/rauc,jluebbe/rauc