Fix regression in page middleware on non TemplateResponse responses.
Revert change to javascript location in default templates.
Version bump to 3.1.3
Added tag 3.1.3 for changeset 78986b7f1bc7