v.25.4Improvement

Cleanup settings during recoverLostReplica same as it

Cleanup settings during recoverLostReplica same as it was done in: #78637. #79113 (Nikita Mikhaylov).
This feature improves the recoverLostReplica process by adding cleanup of settings, similar to the approach introduced in PR #78637.

Why it matters

During the recovery of a lost replica, certain settings need to be properly cleaned up to ensure consistent and error-free operation. This update addresses incomplete cleanup by aligning the process with the proven method from PR #78637, thus enhancing replica recovery reliability.

How to use it

This improvement is internal and automatically applied when using the recoverLostReplica function in ClickHouse. No additional user action is required beyond invoking recoverLostReplica as usual.