Improve spf detection and handling

Spf is not touched anymore when using ie emulation because it works just fine there.
Also using a more general approach which works without changes after the page has
been changed with spf by looking at all click events and determining if they
came from a link element.