gh-38592: Add is_integral method to algebraic numbers
For symmetry with existing methods e.g. `QQ(1).is_integral` or such
method on elements of number fields.
Implementation pretty much copied from `NumberFieldElement`.
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.
URL: https://github.com/sagemath/sage/pull/38592
Reported by: user202729
Reviewer(s): Kwankyu Lee, user202729