Fix inconsistent persistent subscription load

When BMC reboots or bmcweb restarts, the persistent subscriptions may
not be loaded properly but they may still be in the file.

Later on if BMC reboots or bmcweb restarts, those unloaded subscriptions
may potentially and unexpectedly cause the reload into the active
subscriptions.

The key cause is due to the compiler evaluation order for the function
arguments where the last argument is evaluated and pushed into the stack
first.  As the result, the first argument `newSub->id` may already be
invalid after the last argument `std::make_shared<>(std::move(*newSub))`
is evaluated and pushed into the parameter stack [1].
This may cause the failure of `subscriptionsConfigMap.emplace()` and
results in the missing instantiation of the persistent subscriptions.

Tested:
- Create many subscriptions
- GET subscriptions
```
curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions
{
  "@odata.id": "/redfish/v1/EventService/Subscriptions",
  "@odata.type": "#EventDestinationCollection.EventDestinationCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/EventService/Subscriptions/1187258741"
    },
    ...
    {
      "@odata.id": "/redfish/v1/EventService/Subscriptions/949306789"
    }
  ],
  "Members@odata.count": 6,
  "Name": "Event Destination Collections"
}
```
- Restart bmcweb
- GET subscriptions again and check whether they are the same.
- Sometimes, none or only a few may be instantiated like

```
 curl -k -X GET https://${bmc}/redfish/v1/EventService/Subscriptions
{
  "@odata.id": "/redfish/v1/EventService/Subscriptions",
  "@odata.type": "#EventDestinationCollection.EventDestinationCollection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/EventService/Subscriptions/1187258741"
    }
  ],
  "Members@odata.count": 1,
  "Name": "Event Destination Collections"
}
```
- However, the file `/home/root/bmcweb_persistent_data.json` still has
  the old entries.

- Also verify Redfish Service Validator to pass

[1] https://github.com/openbmc/bmcweb/blob/0c814aa604b36cff01b495f9c335f981c7be83be/include/persistent_data.hpp#L184

Change-Id: Ia8a3c1bd3d4f4e479b599077ba8f26e47f8d22ef
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/include/persistent_data.hpp b/include/persistent_data.hpp
index afd2dc0..1c463b1 100644
--- a/include/persistent_data.hpp
+++ b/include/persistent_data.hpp
@@ -173,19 +173,19 @@
 
                             if (!newSub)
                             {
-                                BMCWEB_LOG_ERROR("Problem reading subscription "
-                                                 "from persistent store");
+                                BMCWEB_LOG_ERROR(
+                                    "Problem reading subscription from persistent store");
                                 continue;
                             }
 
-                            BMCWEB_LOG_DEBUG("Restored subscription: {} {}",
-                                             newSub->id, newSub->customText);
+                            std::string id = newSub->id;
+                            BMCWEB_LOG_DEBUG("Restored subscription: {} {}", id,
+                                             newSub->customText);
 
                             EventServiceStore::getInstance()
                                 .subscriptionsConfigMap.emplace(
-                                    newSub->id,
-                                    std::make_shared<UserSubscription>(
-                                        std::move(*newSub)));
+                                    id, std::make_shared<UserSubscription>(
+                                            std::move(*newSub)));
                         }
                     }
                     else