Trac #16306: Replace =0 by is_zero() in test for matrix being alternating

This branch does a couple small improvements to
`src/sage/matrix/matrix0.pyx`, the most important one being a
replacement of "== 0" by "== zero" since there are rings R whose zero
element is not the same as R(0). (Two grammar errors in the doc are also
fixed.)

URL: http://trac.sagemath.org/16306
Reported by: darij
Ticket author(s): Darij Grinberg
Reviewer(s): Vincent Delecroix
Trac #10963: Axioms and more functorial constructions

This ticket implements:

- Support for full subcategories defined by an axiom (Finite,
  Infinite, Facade, Commutative, Associative, Unital, Inverse,
  Distributive, NoZeroDivisors, Division, FiniteDimensional,
  Connected, WithBasis, Irreducible), and joins thereof:

{{{
    sage: Groups() & Sets().Finite()
    Category of finite groups

    sage: Algebras(QQ).Finite() & Monoids().Commutative()
    Category of finite commutative algebras over Rational Field

    sage: (Monoids() & CommutativeAdditiveGroups()).Distributive()
    Category of rings

    sage: Rings().Division() & Sets().Finite()
    Category of finite fields
}}}

- New categories:
  - AdditiveSemigroups, AdditiveMonoids, AdditiveGroups
  - DistributiveMagmasAndAdditiveMagmas
  - MagmaticAlgebras (will replace Algebras in #15043)
  - AssociativeAlgebras
  - UnitalAlgebras
  - Algebras of additive semigroups and monoids

- More mathematical rules:
  - A subquotient of a finite set is a finite set
  - The algebra of a finite set is finite dimensional
  - The algebra of a commutative magma is commutative
  - A finite division ring is a field
  - ...

- Documentation:
  - More documentation for IsomorphicObjects
  - Complete revamping of sage.categories.primer
  - Misc

- Use SubcategoryMethods to put the functorial constructions where
  they belong. E.g. DualObjects, TensorProducts, and Graded are now
  only defined for subcategories of Modules.

- More lazy imports, removed a bunch of unused imports, ...

This ticket is dedicated to the town of Megantic where I was so warmly
welcomed and a good chunk of this ticket got implemented!

URL: http://trac.sagemath.org/10963
Reported by: nthiery
Ticket author(s): Nicolas M. Thiéry
Reviewer(s): Volker Braun, Nils Bruin, Peter Bruin, Frédéric Chapoton,
Darij Grinberg, Florent Hivert, Simon King, Travis Scrimshaw
Trac #15801: Categories over a base ring category

Currently, to construct a category of algebras, we need to specify the
base ring:
{{{
    sage: Algebras(QQ)
}}}

A side effect is that the construction of e.g. {{{GF(p)['x']}}} for a
lot of `p`'s in number theoretic calculations triggers the
construction of many parallel hierarchies of categories.

This is a waste because in most situations only the category of the
base ring is relevant. In particular, the generic code provided to
parents/elements/... only depends on the latter.

The purpose of this ticket is to allow for only specifying the
category of the base ring, as in:
{{{
    sage: Algebras(Fields())
}}}
with
{{{
    sage: Algebras(QQ)
}}}
constructing a subcategory of the former. Then go trough the code,
decide in each case whether we want to use {{{Algebras(QQ)}}} or
{{{Algebras(Fields())}}}, and update the doctests accordingly. In most
case, the latter idiom will be preferable, unless we need some
operation on the category itself.

This would fix the regression noted on #15792 and made worse by
#10963.

Further features for this ticket or follow-up tickets would be to:

- make {{{Modules(...)}}} into a covariant functorial
  constructions. This would give a proper framework for the feature
  {{{Modules(QQ)}}} -> {{{VectorSpaces(QQ)}}} instead of having to
  tackle it with a special hack.

- implement a {{{PolynomialRings(...)}}}  covariant functorial
  construction.

URL: http://trac.sagemath.org/15801
Reported by: nthiery
Ticket author(s): Nicolas M. Thiéry
Reviewer(s): Travis Scrimshaw