isl_ast_codegen.c: refine_generic: hoist out gisting of bounds
In a future commit, we will be passing a different build to
refine_generic that is suitable for deciding how the bounds
should be printed, but not quite suitable for deciding which
constraints to print since its domain may have fewer constraints
and therefore fewer opportunities to remove constraints.
We therefore hoist out the gisting of the bounds so that we
can continue doing so with respect to the same build even
when we pass a different build to refine_generic.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>