fix iframe setup

the ready event does not work consistently on iframes. So any iframe
related setup code must go into the load event handler.

The problem exists e.g. in firefox but not in chrome.

This fixes only the rewriting of link targets. Other features might also
be affected (e.g. relative time). The load event is only triggered after
everything (including images, ...) has loaded which might be too late
for presentation-centric features like relative time.
Merge pull request #926 from xi/feature-fix-iframe-setup

fix iframe setup