Fix redraw when returning to a document

The `doc` object was not cleared on return to home, so following the
path (page1 -> home -> page1) we thought we already had the current
revision displayed, and didn't change anything.  This left us displaying
the home page while looking at #page1.

Fixed by setting doc=null when drawing home.