Ensure that outputs are files, not directories

We've been making this assumption implicitly, and while it is possible
to get the behaviors correct with dependencies, it's quite difficult.
We'd rather all outputs be files instead. So make it a warning by
default, letting us turn it into an error with "-w outputdir=err"

Until the previous change, it was an internal ninja error if an Edge
that created an output directory failed, as we'd try to remove the
directory as if it was a file. The previous change skipped the
RemoveFile if it was detected to be a directory.

It's uncommon to use directories as build nodes, as it is significantly
problematic with how ninja works today -- if you output a directory of
headers, then compile using that directory, the depfile will refer to
individual headers and ninja won't connect them in the build graph. If
there's already an input or implicit dependency that may be okay.

Outputting a directory would also require careful work to ensure that
the timestamp of that directory is valid, and only the correct files
exist -- if you're always doing `rm -rf` and recreating them that works.
But it doesn't protect if some other action (or the user) goes and
modified one or more of the files in the directory (or subdirs).

In Android, we often use dependencies on directories in the source tree,
to detect when files have been added or removed from a directory so that
we can re-run globs and similar. So those have not been restricted.

Test: run ninja_test (build-tools build does this)
Change-Id: Idc51a8bd4b28fae7f425e71217e6def53d139e35
12 files changed