Make viewer header sticky (#772).

Make viewer header position:fixed when scrollTop is not 0. Handle
offset for body when this happens via padding-top. This is all
handled in JS rather than partly in CSS and partly in JS.
Cross-tested against issue #684; works ok.