TestCommon: Fix QuickCheck unused import warning

This only appears on systems with QuickCheck >= 2.7 because
the QC qualified name is only used in the conditional section.

Fixed by making the import conditional as well.

Signed-off-by: Niklas Hambuechen <niklash@google.com>