[Constraints] Track presence of non-Dirichlet constraints in constraints container

This patch extends the ConstraintsTransformation interface with a new
method containsNonDirichletConstraints(), making it possible for the
assembly process to exploit the common case of only having to
incorporate Dirichlet constraints.

The value of this flag is cached in the default implementation, so it is
important to only add new constraints by means of the method
import_local_transformation(), which takes care of updating the cached value.
[LFSIndexCache] Make the caching of constraints controllable via a run-time parameter

The LFSIndexCache currently insists on always caching the constraints
for the DOFs of the currently bound LFS; that behavior can only be
deactivated by passing an EmptyTransformation for the type of the
constraints container, as the cache is specialized for that case and
then completely disables all constraints handling.

However, this way of disabling constraints caching modifies the type of
the LFSIndexCache, which creates a problem for the GridOperator engines,
which need the precise type to instantiate local views for the LA
containers and which creates problems in the case of the combined
residual and jacobian engine of the OneStepGridOperator, where the
residual doesn't require constraints caching, but the jacobian does,
causing a compilation failure.

Moreover, it would be beneficial to control the caching at run-time, as
the full-blown constraints handling that requires caching is only needed
in the presence of non-Dirichlet constraints, something that can only be
queried at runtime.

So this patch adds a new runtime flag to the LFSIndexCache that can be
used to enable or disable constraints caching. It can be passed as a
third parameter to the constructor, but is optional right now and
defaults to true. It is also possible to query the state of the flag
using the new method constraintsCachingEnabled().
[GridOperator] Make constraints caching controllable at run time

This patch switches the query mechanism of the global assembler for the
constraints caching requirements from a compile time interface (static
const bool needs_constraints_caching) to a run time mehod
needsConstraintsCaching(cu,cv). This new method is passed the
constraints containers for both spaces to allow decisions based on the
actual structure of the constraints (e.g. presence of non-Dirichlet
constraints).

Moreover, the patch also changes the non-constrained LFSCache typedefs
in the local assembler to be identical to the constrained ones, as the
caching-decision now happens at run time. This change makes it possible
to use the residual engine in settings without constraints
caching (e.g. when directly calling residual() ) as well as in the
context of the combined residual / jacobian assembly of the
ExplicitGridOperator, where the jacobian might enforce constraints
caching, even though the residual does not need it.

Finally, the patch changes the default constraints caching policy of
several engines:

- The residual engine never required constraints caching, because the
  residual is constrained in a batch operation after assembly is
  done. For some reason, constraints caching was activated
  anyway (probably because of the issue with the combined residual /
  jacobian method of the OneStepGridOperator). Caching has been disabled
  for this engine.

- The jacobian engine now only enables constraints caching if there are
  non-Dirichlet constraints, as Dirichlet constraints are applied after
  assembly is done, just like the residual.

- The pattern engine also only enables caching in the presence of
  non-Dirichlet constraints.

WARNING: This patch modifies the internal API between global assembler
         and assembler engines! Any users with custom assembler engines
         need to add the method needsConstraintsCaching() to their
         implementations!
[GridOperator] Add new method scatter_jacobian() as front end for etadd() et. al.

The new method scatter_jacobian() on the local assembler should be
called instead of etadd(). It inspects the index caches to decide
if the expensive etadd() method has to be invoked. Otherwise, the local
jacobian will be written back without taking constraints into
consideration.

Moreover, the new method has a parameter symmetric_mode that enables
symmetric assembly of Dirichlet constraints.
[GridOperator] Use new method scatter_jacobian() in JacobianEngine

Use scatter_jacobian() to enable optimized scatter code if there are no
non-Dirichlet constraints.

The symmetric assembly mode is disabled for now.
[GridOperator] Make local matrix writable in utility method etadd_symmetric()

etadd_symmetric() has to modify the local matrix in order to clear out
constrained columns, but the object is passed in by const reference.

Fixed.
Merge branch 'feature/improve-constraints-handling'

Improve constraints handling during assembly by only caching constraints
in the LFSIndexCache objects of the global assembler if really necessary
and performing most of the constraints transformation in bulk at the end
of the assembly process.

As part of this change, the constraints cache of the LFSIndexCache can
now be switched on and off at run time.

WARNING: This change breaks the interface between global assembler and
         the assembler engines. If you have custom engines, you will
         have to update them.

* feature/improve-constraints-handling:
  [GridOperator] Make local matrix writable in utility method etadd_symmetric()
  [GridOperator] Use new method scatter_jacobian() in JacobianEngine
  [GridOperator] Add new method scatter_jacobian() as front end for etadd() et. al.
  [GridOperator] Make constraints caching controllable at run time
  [LFSIndexCache] Make the caching of constraints controllable via a run-time parameter
  [Constraints] Track presence of non-Dirichlet constraints in constraints container