DANCE: DAta-Network Co-optimization for Efficient Segmentation Model Training and Inference