#1202: document and reorganize top-level cmake

this makes no changes, only re-groups and documents things