isl_basic_map_detect_equalities: explicitly keep track of any equalities found
The way extend_affine_hull works is that it starts off from an
under-approximation of the affine hull and then extends it with
each extra point found outside of the current approximation.
The affine hull is then determined by the equalities that remain.
However, during the computation, we may find an equality in
the current approximation such that there is no point in the set
outside of this equality. If the approximation is later extended
with a point found outside some other equality, then this first
equality would get tested again. If this is a difficult computation,
then we needlessly go through it again.
By explicitly storing the equality that we have detected in the set,
this computation becomes trivial, to there is no real harm in doing
again. An alternative would be to keep track of all equalities found
in some additional data structure, but adding it to the original set
seems preferable since it may also simplify tests for points outside
other equalities.
Perhaps the calling convention should be changed such that
extend_affine_hull would return the original set intersected
with its affine hull, rather than the affine hull itself.