QmlJS: Fix a performance problem.
QmlJS: Fix a performance problem.

In order to determine all components that instantiate a given component,
Bind::usesQmlPrototype was called on each document in the snapshot.
That, in turn, had to iterate over all object definitions inside the
document, resolving their prototype references.

All in all, it lead to a very large amount of fairly expensive lookups
that were slowing down Creator considerably.

Reviewed-by: Erik Verbruggen

azat/qtcreator,KDAB/KDAB-Creator,AltarBeastiful/qt-creator,duythanhphan/qt-creator,bakaiadam/collaborative_qt_creator,AltarBeastiful/qt-creator,sandsmark/qtcreator-minimap,colede/qtcreator,danimo/qt-creator,amyvmiwei/qt-creator,amyvmiwei/qt-creator,xianian/qt-creator,dmik/qt-creator-os2,darksylinc/qt-creator,bakaiadam/collaborative_qt_creator,martyone/sailfish-qtcreator,KDE/android-qt-creator,malikcjm/qtcreator,KDE/android-qt-creator,ostash/qt-creator-i18n-uk,xianian/qt-creator,pcacjr/qt-creator,renatofilho/QtCreator,syntheticpp/qt-creator,kuba1/qtcreator,AltarBeastiful/qt-creator,dmik/qt-creator-os2,jonnor/qt-creator,maui-packages/qt-creator,colede/qtcreator,hdweiss/qt-creator-visualizer,ostash/qt-creator-i18n-uk,jonnor/qt-creator,KDE/android-qt-creator,bakaiadam/collaborative_qt_creator,omniacreator/qtcreator,bakaiadam/collaborative_qt_creator,jonnor/qt-creator,jonnor/qt-creator,ostash/qt-creator-i18n-uk,farseerri/git_code,martyone/sailfish-qtcreator,KDE/android-qt-creator,darksylinc/qt-creator,sandsmark/qtcreator-minimap,kuba1/qtcreator,AltarBeastiful/qt-creator,syntheticpp/qt-creator,yinyunqiao/qtcreator,duythanhphan/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,malikcjm/qtcreator,martyone/sailfish-qtcreator,pcacjr/qt-creator,bakaiadam/collaborative_qt_creator,darksylinc/qt-creator,danimo/qt-creator,duythanhphan/qt-creator,omniacreator/qtcreator,KDAB/KDAB-Creator,farseerri/git_code,richardmg/qtcreator,malikcjm/qtcreator,azat/qtcreator,kuba1/qtcreator,malikcjm/qtcreator,xianian/qt-creator,danimo/qt-creator,kuba1/qtcreator,dmik/qt-creator-os2,richardmg/qtcreator,dmik/qt-creator-os2,sandsmark/qtcreator-minimap,ostash/qt-creator-i18n-uk,danimo/qt-creator,maui-packages/qt-creator,kuba1/qtcreator,omniacreator/qtcreator,martyone/sailfish-qtcreator,dmik/qt-creator-os2,Distrotech/qtcreator,ostash/qt-creator-i18n-uk,yinyunqiao/qtcreator,martyone/sailfish-qtcreator,renatofilho/QtCreator,Distrotech/qtcreator,AltarBeastiful/qt-creator,xianian/qt-creator,martyone/sailfish-qtcreator,KDE/android-qt-creator,farseerri/git_code,danimo/qt-creator,yinyunqiao/qtcreator,darksylinc/qt-creator,syntheticpp/qt-creator,dmik/qt-creator-os2,colede/qtcreator,KDE/android-qt-creator,sandsmark/qtcreator-minimap,azat/qtcreator,AltarBeastiful/qt-creator,kuba1/qtcreator,maui-packages/qt-creator,omniacreator/qtcreator,renatofilho/QtCreator,richardmg/qtcreator,farseerri/git_code,darksylinc/qt-creator,kuba1/qtcreator,sandsmark/qtcreator-minimap,xianian/qt-creator,martyone/sailfish-qtcreator,bakaiadam/collaborative_qt_creator,sandsmark/qtcreator-minimap,Distrotech/qtcreator,kuba1/qtcreator,xianian/qt-creator,yinyunqiao/qtcreator,syntheticpp/qt-creator,amyvmiwei/qt-creator,amyvmiwei/qt-creator,Distrotech/qtcreator,syntheticpp/qt-creator,pcacjr/qt-creator,maui-packages/qt-creator,KDAB/KDAB-Creator,darksylinc/qt-creator,duythanhphan/qt-creator,Distrotech/qtcreator,pcacjr/qt-creator,farseerri/git_code,azat/qtcreator,KDAB/KDAB-Creator,maui-packages/qt-creator,darksylinc/qt-creator,duythanhphan/qt-creator,AltarBeastiful/qt-creator,KDAB/KDAB-Creator,hdweiss/qt-creator-visualizer,malikcjm/qtcreator,ostash/qt-creator-i18n-uk,farseerri/git_code,pcacjr/qt-creator,duythanhphan/qt-creator,darksylinc/qt-creator,amyvmiwei/qt-creator,hdweiss/qt-creator-visualizer,Distrotech/qtcreator,jonnor/qt-creator,amyvmiwei/qt-creator,duythanhphan/qt-creator,Distrotech/qtcreator,renatofilho/QtCreator,maui-packages/qt-creator,colede/qtcreator,amyvmiwei/qt-creator,azat/qtcreator,bakaiadam/collaborative_qt_creator,xianian/qt-creator,AltarBeastiful/qt-creator,richardmg/qtcreator,colede/qtcreator,richardmg/qtcreator,yinyunqiao/qtcreator,syntheticpp/qt-creator,kuba1/qtcreator,malikcjm/qtcreator,omniacreator/qtcreator,martyone/sailfish-qtcreator,amyvmiwei/qt-creator,malikcjm/qtcreator,omniacreator/qtcreator,jonnor/qt-creator,richardmg/qtcreator,danimo/qt-creator,yinyunqiao/qtcreator,yinyunqiao/qtcreator,hdweiss/qt-creator-visualizer,renatofilho/QtCreator,ostash/qt-creator-i18n-uk,danimo/qt-creator,syntheticpp/qt-creator,KDE/android-qt-creator,dmik/qt-creator-os2,danimo/qt-creator,KDAB/KDAB-Creator,danimo/qt-creator,maui-packages/qt-creator,pcacjr/qt-creator,xianian/qt-creator,omniacreator/qtcreator,colede/qtcreator,richardmg/qtcreator,KDE/android-qt-creator,renatofilho/QtCreator,pcacjr/qt-creator,azat/qtcreator,farseerri/git_code,colede/qtcreator,hdweiss/qt-creator-visualizer,hdweiss/qt-creator-visualizer,farseerri/git_code