BAC-756 Masthead refactored

* remove ``$avoidUpscaling`` parameter from ``Masthead::getThumbnail``
* add unit test for ``AvatarService`` class
* code cleanup

@moliwikia