Cut performance cost in QSGContext::prepareMaterial()

The hash-lookup in this function is costing us a lot, and
since we're looking up the same materials again and again,
and the material has a place holder for it, we can store it
directly in the material at no extra cost. This was a 10%
gain in this particular benchmark.

Change-Id: I46b67791ce39f453fa86d1ee82f6f5c7785b46a1
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Do not return cacheItem->object if it is still incubating

It can happen that cacheItem->object in QQmlDelegateModelPrivate::object
already has a value but that the cacheItem->incubationTask is still
Loading. If we return the object here we can confuse some of QQmlDelegateModel
consumers like QQuickItemView.

E.g. in QQuickItemView if we get to return the object before the createdItem
signal is emitted we will make that when the createdItem signal happens
QQuickItemView::createdItem will be called it will add the item
to unrequestedItems items and will expect that layout/refill will
remove it from unrequestedItems if it is really one of the items we are
creating, but as it has been already created the item will wrongly remain
in unrequestedItems making the item view to act weird

Task-number: QTBUG-28403

Change-Id: I4359391eb2a4012afd3f01d082a99692d63b6639
Reviewed-by: Alan Alpert <aalpert@blackberry.com>