A Virginia judge blocked Democrats’ redistricting plan, handing Trump a major legal win ahead of the midterm elections.