Change representation of styles arrays

As a micro-optimization, and to prepare for the next patch.
Add getTokenTypeAt method

Use it to make xml-fold more robust, and matchbrackets much faster.