Atletico Madrid reached the last 16 of the Champions League after beating Porto in an extraordinary match that saw three players shown red cards.