Fix issue #2527 (closed) by moving all uses of int to sac_int where needed. The main issue was that stackPush was that dims and shapes where collected with a va_arg(dim_shape, int) instead of va_arg(dim_shape, sac_int). Then other code had to change to ensure that enough space was allocated for the sac_int and that the right format strings are used.
Also improves the stack.c code by adding some missing cast from unsigned char* to char* and remove an unused call to get_terminal_width in the arrow renderer.