Use correct window in `magit-mode-refresh-buffer`

(I am not sure how `magit-mode-refresh-buffer` is supposed to work, but it seems to work better with this fix.)

The current code seems to assume that `with-current-buffer` sets the
window buffer of the selected window. Since this is not the case,
`old-window-start` is sometimes wrong, and `unrecord-window-buffer` does
not seem to be needed.

See #1451 for discussion.