With the Makefile generator one can use `cd $subdir; make all` to build
all targets associated with a given subdirectory. This is not possible
to do with the Ninja generator since there is only one `build.ninja`
file at the top of the build tree. However, we can approximate it by
allowing one to run `ninja $subdir/all` at the top of the tree to build
the targets in the corresponding subdirectory.
Port logic from cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2 to
cmGlobalNinjaGenerator in order to produce equivalent directory-level
targets.