Fix constraint sync during migration
- restore constraints lost during merge in test schema.
- use constraint_by_eid in BeforeDeleteCWConstraintHook as done in
3.17.14 for BeforeDeleteConstrainedByHook. Fixes handling of multiple
constraints of the same type.
- make sync_schema_props_perms() delete the CWConstraint entity instead
of the constrained_by relation. In 3.19, the latter doesn't
automatically result in the former just because the relation is
composite. Simplify the constraint migration to delete all removed
constraints and recreate new ones even if they share the same type; that
optimization made the code more complicated for (AFAICT) no significant
reason.
Templates---------*Templates* are specific views that do not depend on a result set. The basicclass `Template` (`cubicweb.common.view`) is derived from the class `View`.To build a HTML page, a *main template* is used. In general, the template ofidentifier `main` is the one to use (it is not used in case an error is raised or forthe login form for example). This template uses other templates in additionto the views which depends on the content to generate the HTML page to return.A *template* is responsible for:1. executing RQL query of data to render if necessary2. identifying the view to use to render data if it is not specified3. composing the HTML page to returnYou will find out more about templates in :ref:`templates`.