CMake: compile skeletor as library.

Now test code doesn't need new compile of the codebase,
and can only be linked against skeletor.