Orientifolds, Branes, and Duality of 4D Gauge Theories