[TRANSFORMATIONS] Destroy constants after replacement in constant folding (#33961)
### Details:
- Changed the for-each loop over `model->get_ordered_ops()` to an
index-based for loop, using `std::move` to transfer ownership of each
node from the `nodes` vector. That would allow us to destroy unused
constants immediately and minimize the peak memory allocation.
### Tickets:
- CVS-176571
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>