Before opening a link on click, check if default prevented.

This is a small change to make it possible for event handlers on dom objects to prevent the default handling of a click. This basically allows a plugin (in this case the link plugin) to tell the toplevel application: Don't open it, it's been handled already. There is a corresponding change in the aloha link plugin.