Fix handling of disabled products when restoring.
Fix handling of disabled products when restoring.

If build data already exists (i.e. the product was not disabled before),
we must not swap it over to the new product, and we need to remove all
the artifacts from the build graph.

Change-Id: I210f8da72a7252905a6c92f3db6b2a907922f7b0
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>

Distrotech/qbs,qt-labs/qbs,qt-labs/qbs,villytiger/qbs,villytiger/qbs,gatzka/qt-labs-qbs,qt-labs/qbs,Distrotech/qbs,gatzka/qt-labs-qbs,Distrotech/qbs,villytiger/qbs,gatzka/qt-labs-qbs,qtproject/qt-labs-qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,villytiger/qbs,villytiger/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,Distrotech/qbs,Distrotech/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,Distrotech/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qt-labs/qbs,villytiger/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,Distrotech/qbs,qtproject/qt-labs-qbs