Remove QtAlgorithms usage from QtQuick1.

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I774f69bd3e60764a144b921a2383d832b38765ce
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>