Check if exteral library is needed to have atomic support.

Akonadi is using atomic feature. Not every platform has direct support
for it. For some libatomic is needed. CheckAtomic from
extra-cmake-modules make sure, test this feature and add the library if
needed.

Fixes: https://bugs.debian.org/961647
2 jobs for !40 with work/check_atomic in 17 minutes and 4 seconds (queued for 64 minutes and 59 seconds)
detached
Status Job ID Name Coverage
  Build
failed #79151
build_clazy_clang_tidy

00:04:34

passed #79150
linux kf5-qt5 qt5.14

00:12:30

1.0%
 
Name Stage Failure
failed
build_clazy_clang_tidy Build
-- Configuring incomplete, errors occurred!
See also "/builds/pim/akonadi/build/CMakeFiles/CMakeOutput.log".
See also "/builds/pim/akonadi/build/CMakeFiles/CMakeError.log".
Uploading artifacts for failed job
Uploading artifacts...
WARNING: build/clang-tidy-report.xml: no matching files
ERROR: No files to upload
Cleaning up file based variables
ERROR: Job failed: exit code 1