encoding: added encoding directory with data files for statistics gathering
parser: do not scan encodings directory if its string size equals to zero
similarity: use charset detector when dealing with documents