[IM] Make CommandHandler::AddResponseData atomic (#15906)

* Add encode failure tests

* [IM] Make CommandHandler::AddResponseData atomic

* Reset -> Rollback

* Rename: AddResponseData -> AddResponse

* Address comments

* Update cluster code

* 50 ms is too short on CI

* Fix

* Fix
diff --git a/src/app/tests/TestTimedHandler.cpp b/src/app/tests/TestTimedHandler.cpp
index e92fedf..2af7563 100644
--- a/src/app/tests/TestTimedHandler.cpp
+++ b/src/app/tests/TestTimedHandler.cpp
@@ -111,7 +111,7 @@
     TestContext & ctx = *static_cast<TestContext *>(aContext);
 
     System::PacketBufferHandle payload;
-    GenerateTimedRequest(aSuite, 50, payload);
+    GenerateTimedRequest(aSuite, 500, payload);
 
     TestExchangeDelegate delegate;
     ExchangeContext * exchange = ctx.NewExchangeToAlice(&delegate);