One avenue would be a non-profit organization that takes membership fees from software firms and uses the pooled money to fight these legal battles, or make collective licensing agreements.
The shakedown side of the troll business model relies on their being able to absorb more in legal fees than their targets. If their targets could actually force them to follow-through on their legal threats, the profitability of this method might drop to a level where they don't bother.
It would, unfortunately, do nothing about the cases where trolls are confident enough to take their shots at Google, Apple, Microsoft, et al.