Optimal Multipass Self-Routing Algorithms for Clos-Type Multistage Networks