bus: Only close connections we own

If we have multiple code segments in the same thread acquiring the
default bus, we end up with the potential for one of those handles to be
destroyed, calling sd_event_flush_close_unref(). This terminates the bus
for all users of the same reference. Any of the reference which still
exist after the first destroy will then return ENOTCONN for all bus
operations since it is now closed. This behavior is undesirable as we
expect to be able to have transient bus references.

However, we do want to make sure we clean up any buses created by
sd_bus_open().

See openbmc/phosphor-time-manager@4e84539349dac086ce2a58e5b9900ed4e40a2eaf
for a specific example of this behavior being unwanted.

Change-Id: I8aad7e282e9d66993b63e85532dce37c179ad5dc
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/bus/match.cpp b/test/bus/match.cpp
index 3a5cc49..2074cde 100644
--- a/test/bus/match.cpp
+++ b/test/bus/match.cpp
@@ -6,7 +6,7 @@
 class Match : public ::testing::Test
 {
   protected:
-    decltype(sdbusplus::bus::new_default()) bus = sdbusplus::bus::new_default();
+    sdbusplus::bus::bus bus = sdbusplus::bus::new_bus();
 
     static constexpr auto busName = "xyz.openbmc_project.sdbusplus.test.Match";