Implemented Nearest Aspect Ratio thumbnail algorithm

PLAT-689 #time 5d