remove_all_equalities: copy context whenever main polyhedron is updated
The condition "Q != *P" is used in the calls to transform and
remove_parameter_equalities to indicate that the input polyhedra
should be freed when updated.
Initially Q and D point to the original polyhedra, which should
not be freed. If the original Q gets replaced by a new polyhedron
then D (if set) should point to a new polyhedron as well,
otherwise the original polyhedron will get freed whenever
the context gets updated.
It is not clear whether this can happen in practice without
also running into the issue fixed by the next commit,
but it is definitely needed for the next commit.
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>