lang_detect: moved language detector into separate class and header
parser: new internal parser implementation based on recursive tree traversion