Reducing noise from tokens while learning

When combination of tokens exceeds maximum number of patterns that can
be learned, we do a noise reduction on the tokens array. The algorithm
basically finds the largest array and pops elements from the last till
it gets the required number of tokens. Since tokens are ordered
according to the importance, removing tokens from last will only remove
unimportant tokens.

This commit also reduces allowed number of patterns from 100 to 32