[CommRustModule] improve params capturing
Summary:
Addresses https://phab.comm.dev/D10510#inline-64080.
Alternative is using std::shared_ptr, but I don't think is safe because as far as I know jsi::* objects lifetime is managed by the JavaScript runtime, is tied to the JavaScript garbage collector, not by C++ here itself, so I am afraid it could potentially lead to dangling pointers.
Depends on D10530
Test Plan: Test entire stack (it uses methods here).
Reviewers: marcin, varun, michal
Reviewed By: varun
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10550