Improve parsing of test case class names

The unlikely but valid case of extra tokens occurring between the 'class'
keyword and the class name is now handled correctly.

MIN_TOKEN_LENGTH is also removed, as it seems error-prone and likely an
insignificant optimization.