Validate qmlEngine() in QDeclarativeItem::mapToItem() function.

We protect against the fact that engineForScript() can be
called with 0 or something else.

Task-number: QTBUG-29572
Change-Id: I92f62b328d1e84a378449e0857569886f327077c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>