Make clients use the QT_NO_DEBUG flag when using QtCore in release mode.

This is similar to 9a5ade8abecd9763691127fe0f951303f5ce74bd which
modified the qt5_use_modules macro.

Change-Id: Ib63ee693ed2e25de6ac9d969e8be27ddbf8948c3
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>