gh-37082: Fix NumberFieldElement_quadratic.is_integral() when D is not square-free
Fixes #34800. The current implementation of is_integral() assumes that D
is square-free. We implement the check for integrality of the trace and
norm in a way that works for general D.
URL: https://github.com/sagemath/sage/pull/37082
Reported by: Peter Bruin
Reviewer(s): Travis Scrimshaw