cmake: Split off functionality for LLVM loadable module

This fixes the buildbots who failed, because the linker eliminated most of the
Polly functionality when building without BUILD_SHARED_LIBS=ON.

Besides fixing the build, this change also brings additional functionality. With
the new separation between the general polly libraries and the functionality for
the polly module, it is now possible to link polly directly into a tool instead
of using requiring users to load a shared library.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@202762 91177308-0d34-0410-b5e6-96231b3b80d8