In a major blow to Republicans who control the Legislature in one of the nation’s most bitterly divided states, a state court panel threw out North Carolina’s state legislative maps as an unconstitutional partisan gerrymander and ordered lawmakers to draw up new ones in two weeks.