Prepare to get rid of the Qt3D dependency

This patch puts most Qt3D dependencies in ifdefs and thus is the
first step to eliminate the dependency.

Change-Id: Ifa3c3213aacd8dd50aec18fedd4df3d3c34671e8
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>