These two court rulings show the tide might be turning on partisan gerrymandering