For one-source directories, be smart and just define SOURCES to that,
will reduce the number of too-simplistic CMakeLists.txt in our tree.
This also fixes problems with libraries, they should be private, not
public. So specify both kinds as different variables.
Stick to one target per directory and remove prefix from variables,
makes it cleaner and easier to use.
Document variables used and use a more consistent name that matches
CMake properties.
Macros do not start a new scope and can leave leftovers, then use
functions. However to set and append to global scope is cumbersome,
add functions to aid that.