Don't export internal classes when not building autotests.
Summary: surely this is the reason for having a different export macro
Test Plan:
with BUILD_TESTING=FALSE, the generated header just says
#define AKONADI_TESTS_EXPORT, and everything still builds.
Reviewers: dvratil
Reviewed By: dvratil
Subscribers: KDE PIM
Tags: KDE PIM
Differential Revision: https://phabricator.kde.org/D4694