[ENG-5719](https://linear.app/comm/issue/ENG-5719/improve-pointers-handling#comment-3768ecd3).
We wan't to use it on the web too and finally remove `MessageWithMedias`, but Emscripten does not support `std::pair` - the easiest way to fix that is to just change it to a struct.
Depends on D14667