[1.7.x] Fixed #23492 -- Restored F.__deepcopy__.

This reverts commit 3a66035107a640c4905f0a5f247a45f32dbe16d7.
A regression test was also added.

Backport of d63ac5b595694c44ed8a64d782a177d2f92125d9 from master.
[1.7.x] Added 1.7.1 release notes for refs #23492.

Backport of 92a8213fdb from master