Refactor how bundles and frameworks are supported.

Make handling of directory separators consistent between
non-bundle and bundle code.

Remove xcode specific flag from cmTarget when getting install_name.

Add (more) consistent convenience functions in cmTarget to get
directories inside of bundles and frameworks to add files to.

This refactor also fixes bug #12263 where frameworks
had the wrong install name when SKIP_BUILD_RPATH.

Also make install_name for frameworks consistent between Makefile
and Xcode generator.
Merge branch 'framework-refactor' into next
Merge topic 'xcode-shared-linker-flags-per-config'

bcda47d Xcode: Honor CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> (#14161)
Merge topic 'xcode-attributes-variant'

332350b Xcode: Support XCODE_ATTRIBUTE_ with [variant=<config>] (#12532)
Merge branch 'master' into next