Properly clear old constraints when recalculating

This fixes two bugs:

A bug in master, where we fail to clear constraint coefficients
properly when the last constraints are removed from a 1D problem
(basically impossible to trigger)

A bug in adjoint_dirichlet, where we fail to clear heterogenous
constraint rhsvalues properly, ever (destroying solutions)