COMET: Learning Cardinality Constrained Mixture of Experts with Trees and Local Search