Allow to build Sonnet without Qt5Widgets
This is useful for cross-compilation, where we only need the QtCore-only
parsetrigrams build tool on the host and avoids having to pull in a full
graphics stack for the host build in Yocto.
Reviewers: Frameworks, cordlandwehr, aacid
Reviewed By: aacid
Differential Revision: https://phabricator.kde.org/D6990