Properly restore horizonal scroll position on refresh() calls

Issue #1164
Fix workaround for webkit bug in rendering of overlong text nodes

Issue #1163