Labour Party mood turns ‘pretty ugly’ after Shabana Mahmood and Yvette Cooper urge prime minister to set exit plan