gh-36873: add is_trivial method for groups
We add a method to check whether a permutation group is trivial, that
is, consists only of the identity element.
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have created tests covering the changes.
URL: https://github.com/sagemath/sage/pull/36873
Reported by: Martin Rubey
Reviewer(s): Dima Pasechnik, Jukka Kohonen, Martin Rubey