pub fn visible_width(str: &str) -> usize
Calculate the visible width of a string in terminal columns. Strips ANSI escape codes and counts grapheme cluster widths. Uses a thread-local LRU cache for non-ASCII strings (matching pi).