pw_build: Update path and target resolution

- Don't implicitly convert paths and labels in python_runner.py.
- To enable finding target outputs, support explicit resolution with
  the <TARGET_FILE($target)> expression.
- Use the standard GN rebase_path approach to resolve GN paths to
  filesystem paths for scripts. Remove workarounds that are no longer
  necessary.
- Update build files to use rebase_path and <TARGET_FILE(target)>.
- Add tests for python_runner.py.

Bug: 110
Change-Id: Iae262820bb265c648c270c2b78d058f20e1d3d1f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/14801
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
diff --git a/pw_build/linker_script.gni b/pw_build/linker_script.gni
index ba4a4d8..47dfd8f 100644
--- a/pw_build/linker_script.gni
+++ b/pw_build/linker_script.gni
@@ -74,7 +74,7 @@
       # Treat the following file as a C file.
       "-x",
       "c",
-      get_path_info(invoker.linker_script, "abspath"),
+      rebase_path(invoker.linker_script),
     ]
 
     # Include any explicitly listed c flags.
@@ -90,7 +90,7 @@
     # Set output file.
     args += [
       "-o",
-      _final_linker_script,
+      rebase_path(_final_linker_script),
     ]
     outputs = [ _final_linker_script ]
   }