Moved all encoding-related stuff to separate class.

This class stores only encoding flags.
Everything else (number of code points,
number of different characters in input
stream, size of symbol, size of character,
etc.) is generated on the fly.