Fix build without Qml and Quick modules.

Conditionally enable auto-tests that depend on the Quick and Qml
modules.

Task-number: QTBUG-35911
Change-Id: I8b9d304ea630093d423b48a4ebc53ef6f4280244
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>