This avoids the problem that when one of the caches is restored and the
other isn't, Rust doesn't get reinstalled, but it also isn't usable,
crashing the CI.
Plus some minor improvements and clean-ups:
* Resolve DENO_BUILD_PATH to an absolute path if necessary.
* Rename DENO_BUILD_PATH to GN_OUT_DIR in places where it is supposed to
be set by the build system (and not a user configuration variable).
* Output Cargo `rerun-if-*-changed` instructions first, so even if the
build itself fails, configuration changes will still trigger a re-run
of build.rs.
* Remove TODOs that are impossible.
* Re-run build.rs when the flatbuffer definition file changes.
- Based on code from @qti3e and @piscisaureus in #724 and #1125
respectively.
- TODO The DENO_BUILD_PATH env var must be supplied and must be an
absolute path, this restriction should be removed in future work.
(Use C:\deno instead of c:\deno in appveyor config because it's cloned to c:\ by clone_folder variable in .appveyor.yml. On the other hand, build directory is pointed to C:\ by $(APPVEYOR_BUILD_FOLDER) so that test targets are placed on separated partitions.)
* Add forgotten --eol argument to 'git ls-files'. Without it, in certain
edge cases, files might have their mtime restored when it shouldn't.
* Don't parse ls-files output into fields; it's unnecessary.
* Disable the pip cache dir, and stop saving it to the appveyor cache.
* Leverage the 'git -C «dir»' flag to make a script shorter.
* Fix some factually and/or grammatically incorrect comments.
* Don't update the cache after building a PR or feature branch.
* Work around 'rustup update' erroring when an update is found.
* Log deleted directories and success/failure status.
* Make build log less noisy.