MDL-43679: moodlelib: Don't redirect MS Word in require_login()

Microsoft Word performs a behind-the-scenes HTTP request when you ask it
to open a hyperlink, in order to skip opening your browser if it points
to a Word document (in which case it'll just open it directly). However,
in doing so, it follows all redirects - and then passes the *final* URL to
the browser upon determining that it's not a Word document. This either
results in a "You are already logged in" message (if you are), or the
login returning you to the front page rather than the requested page.