Improved ROOTConfig.cmake to support COMPONENTS and TOOLS. Fixes ROOT-5371 and ROOT-5787.