gh-37074: implement natural morphism from cl(f²D) to cl(D)
...for class groups of binary quadratic forms, which we have since
#36184.
This map is defined by finding a class representative $[a,b,c]$ for
which $f^2 \mid a$ (and $f \mid b$) and then applying the substitution
$x \mapsto x/f$. In the code, we do it in prime steps, since that makes
finding a suitable representative a little easier.
This can be used, among other things, for determining the kernel of the
surjection $\mathrm{cl}(f^2D) \twoheadrightarrow \mathrm{cl}(D)$.
URL: https://github.com/sagemath/sage/pull/37074
Reported by: Lorenz Panny
Reviewer(s): Lorenz Panny, Travis Scrimshaw