Fix EC Delegate use-after-free in IM (#20141)
Fix EC Delegate use-after-free in IM (#20141)

If an error was encountered parsing the SubscribeResponse message,
ReadClient::OnMessageReceived would just null-out the EC pointer but not
the delegate pointer within the EC. This meant that when we got back to
the exchange management layer after unwinding the stack, it attempted to
call OnExchangeClosing on the delegate that had by then, been free'ed as
part of cleaning up the ReadClient object.
nestlabs/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,nestlabs/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip,project-chip/connectedhomeip