Apply factory model to ThumbnailManager class

`getThumbnail` is now suitable for multiple formats, depends on their extension names.

To add another handler, finish the implementation method in class and add a route in  `getThumbnail` method.