The Supreme Court has ruled that litigation funding agreements are "unenforceable" in competition cases, in a judgment that could have far-reaching implications for how class action suits are funded.