CPack: Simplify and clean up some CPack functions
Looking through the code of CPack (in particular Source/CPack/cmCPackGenerator.cxx
) one notices that CPack's implementation grew over time.
This merge-request tries to simplify some of its functions, and adds/fixes some code comments.