THEORY OF NUCLEAR REACTIONS. VI. UNITARITY, OPEN AND CLOSED CHANNELS