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
It is possible that both BUILD_FULL and BUILD_STATIC are set at the same time.
In that case ELEKTRA_LIB_TARGET_NAME would be set twice and elektra-full would not have the properties it needs. To reduce the duplication a loop would be needed.