V4: fix Array.indexOf() for QStringList

Autotest is included.

Task-number: QTBUG-33542
Change-Id: I46c3a81006019c6613a3d35aa018217f85a15d0b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Check that the pathlist is not empty before calling sort() on it

Try to fix QTBUG-34834, where the app crashes because we replaced
qSort with std::sort(). Apparently std::sort always dereferences
begin(), even if it is the same as end().

Task-number: QTBUG-34834
Change-Id: I6207a27f61f21265dd964d7f4a6b78d059c615c8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix bad refcounting for Context2D.drawImage with an image item source.

The pixmap we get from createPixmap is cached internally in the
QQuickCanvasItem's cache so we need to refcount it properly. Using
take would result in the refcount going to zero in this function
which would cause a crash.

Task-number: QTBUG-34714
Change-Id: I5f0e75a7117c53e4b89ac133ba7d161bc7b9053d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>