Sweeping victories by progressives expose divisions over how party takes on Trump in November’s elections