Populate info in background thread

This change incorporates
https://gerrit.openbmc.org/c/openbmc/openbmc-tools/+/50784 and
https://gerrit.openbmc.org/c/openbmc/openbmc-tools/+/50088.

The function `ListAllSensors` populates a list of DBus sensor objects.
Currently it runs in the main thread before the UI gets created.

To enhance user experience, this routine is moved to a separate thread,
so the information is populated by that thread, so the main thread does
not get blocked while the list is being filled.

Originally, change 50784's ListAllSensors function includes the
following steps:
1) List DBus connections currently on the Bus
2) Get Creds for each of the DBus connections
3) Examine objects in ObjectMapper to ..
  * See if they are Sensor objects
  * If so mark a "Sensor" as "visible in ObjectMapper"
4) List all Associations recorded in the ObjectMapper
  * So they can be shown in the sensor info panel
5) Find association definitions
6) Find association endpoints
7) Check all objects from HwMon daemons
  * Objects from the DBus-Sensors daemon will be added later
8) Check `ipmitool sdr`

Step 8) is currently removed in this change since running `ipmitool sdr`
can potentially take a long time.

Change-Id: If6f27f130060b52e22c405942a861ba40e45ced2
Signed-off-by: Sui Chen <suichen6@gmail.com>
diff --git a/views.hpp b/views.hpp
index 149411a..b661389 100644
--- a/views.hpp
+++ b/views.hpp
@@ -349,9 +349,10 @@
         curr_sensor_id_ = sensor_ids_[choice_];
     }
 
-    // Cache the sensor list in the sensor snapshot
+    // Make a copy of the SensorSnapshot object for display usage
     void UpdateSensorSnapshot(SensorSnapshot* snapshot)
     {
+        sensor_snapshot_ = *snapshot;
         std::string old_sensor_id = "";
         if (choice_ != -999)
         {
@@ -404,6 +405,7 @@
 
     State state;
     std::string GetStatusString() override;
+    SensorSnapshot sensor_snapshot_;
 };
 
 class DBusStatListView : public DBusTopWindow
@@ -532,4 +534,10 @@
     {
         return "";
     }
+
+    void SetStatusString(const std::string& s)
+    {
+        status_string_ = s;
+    }
+    std::string status_string_;
 };