Page charset fix

So here is my branch to address the issues tackled in #810, #850, #862

It uses the recently committed work in #874

My comments on the other pulls:
#810 tries to use the backcompat u/utf-8, and falls back on latin-1, with no attempt to get charset
#850 tries to change the backcompat function to handle other decodings, but tries to match all archive content-types, instead of just doing 'not text/html'
#862 adds additional content type checks, but leaves the redundant filename based check, and doesn't handle charset param at all.