gh-38461: work on Simon two-descent
using `pari` library rather than `gp` interface ; also avoiding direct
use of `sage_eval`
### :memo: Checklist
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
URL: https://github.com/sagemath/sage/pull/38461
Reported by: Frédéric Chapoton
Reviewer(s): Frédéric Chapoton, Travis Scrimshaw