[TRANSFORMATIONS][CPU][GPU] Backport RoPE related optimizations to OV 2024.2 (#25281)
### Details:
This PR cherry-picks multiple RoPE PRs from master branch to OV 2024.2
version:
- https://github.com/openvinotoolkit/openvino/pull/24615
- https://github.com/openvinotoolkit/openvino/pull/24750
- https://github.com/openvinotoolkit/openvino/pull/24756
- https://github.com/openvinotoolkit/openvino/pull/24829
- https://github.com/openvinotoolkit/openvino/pull/25200
---------
Co-authored-by: Roman Lyamin <Roman.Lyamin@intel.com>
Co-authored-by: Zhang Yi <yi3.zhang@intel.com>