A federal appeals court has struck down a Nasdaq rule that required companies to have diverse boards.