ETag: use the same rules as in OutputPage::checkLastModified (release-219)

Backporting #3334