Avoid quadratic complexity in occurrence analysis (fix Trac #1969)
The occurrence analyser could go out to lunch in bad cases, because of its clever loop-breaking algorithm. This patch makes it bale out in bad cases. Somewhat ad-hoc: a nicer solution would be welcome. See Note [Complexity of loop breaking] for the details.