Deduplicate event ids

Redfish specification states:
```
The value of the id field shall be the same as the Id property in the
event payload. The value of the Id property in the event payload should
be the same as the EventId property of the last event record in the
Events array. The value of the EventId property for an event record
should be a positive integer value and should be generated in a
sequential manner.
```

The event service code did not implement that correctly.  So:
1. Add ID fields for all events.
2. Remove the per-sse connection id field and rely solely on
   EventServiceManager.
3. Make sure all paths, (including metric report) are generating an
   event id that's based on the eventservice event id

Tested: Redfish event listener now sees events populated.
LastEventId when sent to the SSE socket now sees a contiguous id.

```
uri=$(curl -s --user "root:0penBmc" -k "https://192.168.7.2/redfish/v1/EventService" | jq -r .ServerSentEventUri)
curl -u root:0penBmc -vvv -k -N -H "Accept: text/event-stream" -H "Last-Event-Id: 0" "https://192.168.7.2$uri"
```

Change-Id: Ic32e036f40a53a9b2715639ae384d7891c768260
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/include/subscription.hpp b/redfish-core/include/subscription.hpp
index 9c48dbb..704d07a 100644
--- a/redfish-core/include/subscription.hpp
+++ b/redfish-core/include/subscription.hpp
@@ -43,7 +43,6 @@
 struct TestEvent
 {
     std::optional<int64_t> eventGroupId;
-    std::optional<std::string> eventId;
     std::optional<std::string> eventTimestamp;
     std::optional<std::string> message;
     std::optional<std::vector<std::string>> messageArgs;
@@ -51,18 +50,6 @@
     std::optional<std::string> originOfCondition;
     std::optional<std::string> resolution;
     std::optional<std::string> severity;
-    // default constructor
-    TestEvent() = default;
-    // default assignment operator
-    TestEvent& operator=(const TestEvent&) = default;
-    // default copy constructor
-    TestEvent(const TestEvent&) = default;
-    // default move constructor
-    TestEvent(TestEvent&&) = default;
-    // default move assignment operator
-    TestEvent& operator=(TestEvent&&) = default;
-    // default destructor
-    ~TestEvent() = default;
 };
 
 class Subscription : public std::enable_shared_from_this<Subscription>
@@ -90,21 +77,17 @@
     void onHbTimeout(const std::weak_ptr<Subscription>& weakSelf,
                      const boost::system::error_code& ec);
 
-    bool sendEventToSubscriber(std::string&& msg);
-
-    bool sendTestEventLog(TestEvent& testEvent);
+    bool sendEventToSubscriber(uint64_t eventId, std::string&& msg);
 
     void filterAndSendEventLogs(
-        const std::vector<EventLogObjectsType>& eventRecords);
+        uint64_t eventId, const std::vector<EventLogObjectsType>& eventRecords);
 
-    void filterAndSendReports(const std::string& reportId,
+    void filterAndSendReports(uint64_t eventId, const std::string& reportId,
                               const telemetry::TimestampReadings& var);
 
     void updateRetryConfig(uint32_t retryAttempts,
                            uint32_t retryTimeoutInterval);
 
-    uint64_t getEventSeqNum() const;
-
     bool matchSseId(const crow::sse_socket::Connection& thisConn);
 
     // Check used to indicate what response codes are valid as part of our retry
@@ -115,7 +98,6 @@
     std::function<void()> deleter;
 
   private:
-    uint64_t eventSeqNum = 1;
     boost::urls::url host;
     std::shared_ptr<crow::ConnectionPolicy> policy;
     crow::sse_socket::Connection* sseConn = nullptr;