Modify trimLabels() algorithm.

Modify trimLabels() algorithm to be more flexible. Now, we just turn on/off some year, month, day,... indicators. Special cases can then be handled after after redundancy and precision maintenance happen. Finally, the trimmed label is constructed from the state of these indicators. This makes it easier to change the algorithm when special cases are modified.

Required precision tests have now been removed from TimeScalesTest because the maintainRequiredPrecision() method no longer returns a string.
Merge origin/master