main: Leverage common function for loop

sdeventplus now has a common function that works around dbus memory
leaks when being used with sdbus.

Change-Id: Id4a405508296c63158abfa28c4063a386704480b
Signed-off-by: William A. Kennington III <wak@google.com>
3 files changed