Opponents of partisan gerrymandering have scored a series of legal victories in recent weeks as courts rule in favor of reforms aimed at making congressional elections more competitive.