Refactored QuickStatsController::shortenNumberDecorator() and its test

For some reason this unit test failed when I ran all unit tests before merging our sprint changes to dev branch. I mocked `wfMessage()` global function here. @wladekb @themech tell me what you think about it, please.