Codeintel2: Python3 compatibility: TextInfo encodings

TextInfo initially opens an unencoded file (bytes) then it tries to
find the encoding from small portions of the file (head and tail)
If it finds the encoding it decodes the file and further tries to
find out more information about it (like the language, etc.) This
time, however, the content is in Unicode form. The patch adds both
versions of the checkers.