Qt4: Create IMPORTED executable targets for all Qt executables.

Qt 5 already has similar IMPORTED targets.  The versioned namespace will
allow de-conflicting the variable names between Qt 4 and Qt 5.
Qt4: Use IMPORTED executable names with custom commands.

Finding Qt 5 can overwrite the QT_MOC_EXECUTABLE variable with the
moc from Qt 5. Use the IMPORTED target with the explicit version in
the name to avoid that.
QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.

Avoid using the moc from Qt 5 with Qt 4 based targets. Moc generates
a version check to ensure that such generated code does not compile.

The Qt4And5Automoc unit test should have been testing this, but it
was not because the test was broken. In that unit test, moc was run
on trivial files which have no significant content, and in particular
no Q_OBJECT macro.  Therefore moc was generating empty files which
do not even contain the version check.  Fix this by generating files
for input to moc at cmake time.
QtAutogen: Remove read of SKIP_AUTOUIC target property.

Skipping AUTOUIC for a target is achieved by setting the AUTOUIC
target property go OFF.
QtAutogen: Remove unused variables.
QtAutogen: Fix autouic target options in the presence of a config.

Read the correct variable.  Add scopes to prevent escape of variables.
QtAutogen: Make some methods appropriately file-static.
QtAutogen: Separate source file processing from AUTOMOC.

This will allow using AUTOUIC without using AUTOMOC for example.
QtAutogen: Short-circut some logic when moc is not available.

This is the case when AUTOMOC is false.  This prevents creating rules
to moc the files in the absense of moc.
Merge topic 'fix-Qt-autogen' into next

f7ae1d8a QtAutogen: Short-circut some logic when moc is not available.
4b989d5f QtAutogen: Separate source file processing from AUTOMOC.
c48d877d QtAutogen: Make some methods appropriately file-static.
394e86df QtAutogen: Fix autouic target options in the presence of a config.
964d7f2a QtAutogen: Remove unused variables.
0d934efd QtAutogen: Remove read of SKIP_AUTOUIC target property.
321e348e QtAutogen: Use Qt 4 IMPORTED targets to find executable locations.
e96683b0 Qt4: Use IMPORTED executable names with custom commands.
e6182f5d Qt4: Create IMPORTED executable targets for all Qt executables.