gh-37622: Ensure the `degree()` method of `Polynomial_generic_dense_inexact` returns an `Integer`
On the testing of a bunch of new hyperelliptic curve code things, I keep
finding cases where the degree of polynomials is returned as an `int`
instead of `Integer`. Here's another fix for the case when we have
polynomials over Eisenstein extensions of p-adics.
Fixes: https://github.com/sagemath/sage/issues/37621
URL: https://github.com/sagemath/sage/pull/37622
Reported by: Giacomo Pope
Reviewer(s): grhkm21