A federal court is reinstating a seasonal closure of nearly 1,000 square miles of lobstering grounds off Maine’s midcoast that regulators imposed last year.