gh-35375: Fix minimal kernel basis corner cases
Fixes the issues in #35258 and add relevant tests/examples
- fix the case of the zero matrix (test `d is -1` replaced by `d == -1`)
- fix the case of matrices having zero columns or zero rows
- fix the construction of the approximation order in the corner case
where it may have a zero entry (e.g. constant matrix having a zero
column or row), by adding `1` to this entry in such cases (the
approximation order of this column/row does not matter anyway since the
column/row is zero).
URL: https://github.com/sagemath/sage/pull/35375
Reported by: Vincent Neiger
Reviewer(s): Travis Scrimshaw