[TS-2665] Clean up ink_stack_trace_dump code