remove some duplicate CMake code

I did see a lot of duplication in src/libelektra/CMakeLists.txt just because there are two different target names.

This commit does the following:
-) Set the target name as a variable (depending on build type)
-) Set the type of library to be built (static or shared, depending on build type)
-) use the variable with the target name in the rest of the CMake buildscript
There are usecases for this, e.g. the full variant is sometimes used for testing, but the static variant is used for bootup (e.g. w/o /usr/lib available).

An error should be detected as early as possible. So its not good to have a CMakeOption combination that works fine in the cmake run, but leads to compiler errors. (as it is would be with this pull request) See also #111