When more than one value is given to the NAMES option this command by
default will consider one name at a time and search every directory for
it. Add a NAMES_PER_DIR option to tell this command to consider one
directory at a time and search for all names in it.
In Tests/CMakeOnly/find_library/CMakeLists.txt generalize the
test_find_library macro and move the lib64 substitution logic to a new
test_find_library_subst macro.
When a search path contains multiple "lib/" instances we previously
converted all or none. This fails for cases where only some of the
multiple instances must be converted. Teach AddArchitecturePaths to
generate all combinations that exist. Uncomment these cases in the
CMakeOnly.find_library test now that they work.
Add a "CMakeOnly.find_library" test covering various cases involving
lib->lib64 (non-)conversion. Comment out cases involving mixed path
components "lib" and "lib64", such as lib/A/lib64 and lib64/A/lib, as
these are known to be broken currently.