Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to the simplified canonical path. The canonical path should have no double slashes, no '.' components, and '..' goes up one level.
Stack-Based Path Parsing
Push directories onto stack, pop on '..', ignore '.' and empty parts.