gh-36703: make modform rings for triangle groups use Algebras
This is using the category framework in a few more rings, namely modular
forms for triangle groups.
### :memo: Checklist
- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
URL: https://github.com/sagemath/sage/pull/36703
Reported by: Frédéric Chapoton
Reviewer(s): Kwankyu Lee