Add some encoding/decoding utilities for git files
Users have regularly noticed that some files are being returned with an
incorrect character encoding. This is because the files were not pure
ascii, but did not bear any difinitive markers of the UTF family of
encodings. It tends to fall back to ISO-8859-2 (latin-2) or
Windows-1250. This adds some helpful utilities that will use chardet to
guess the encoding, but will heavily skew the results in favor of utf-8
if the encoding is in doubt. It also modifies the raw file view and the
highlighted code view to use the new utilities.
Fixes https://pagure.io/pagure/issue/891
Signed-off-by: Jeremy Cline <jeremy@jcline.org>