Currently gn builds into "target/debug"
however cargo tells gn to build into
"target/debug/build/deno-26d2b5325de0f0cf/out"
This patch changes it so that they both build into "target/debug".
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.