gh-37693: Implement the hypercenter and upper central series for finite dimensional Lie algebras
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->
We implement the upper central series and hypercenter of a finite
dimensional Lie algebra.
As part of the testing, we found improvements could be made to the
generic example (needed so the example would work with these tests): We
moved the `reduce()` method up to the category. Implemented methods
expected for the subalgebras. Better input verification. Elements are
now hashable. We had to work around the fact that `lift()` is serving
multiple roles as to the UEA and to the ambient space for a Lie
subalgebra. This functionality needs to be divided (I take full
responsibility for this bad design) by renaming `lift` to something for
the UEA map, but this is a significant change that should be done on a
followup PR.
We also fixed some bugs and improved efficiency with changing vectors
into Lie algebra elements.
### :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.
- [x] I have updated the documentation accordingly.
### :hourglass: Dependencies
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
URL: https://github.com/sagemath/sage/pull/37693
Reported by: Travis Scrimshaw
Reviewer(s): Matthias Köppe, Travis Scrimshaw