Build native_binary/test src in correct configuration (#341)

This attribute is incorrectly being built in the host configuration when
(like any test) it will run in the target configuration. This means that
cross compilation will be broken and options that differ between host
and target (e.g. `NDEBUG`) will not be as set by the user.

I confirmed that without this fix, a test binary with `assert(false)`
passes when run under `native_test`.

Additionally, the use of `allow_single_file` precludes rules that return
multiple files in their DefaultInfo (like `py_binary`). Instead, we can
use `allow_files` and access via `ctx.executable`.
diff --git a/rules/native_binary.bzl b/rules/native_binary.bzl
index 8899cd1..a3f0d73 100644
--- a/rules/native_binary.bzl
+++ b/rules/native_binary.bzl
@@ -25,9 +25,9 @@
 def _impl_rule(ctx, is_windows):
     out = ctx.actions.declare_file(ctx.attr.out)
     if is_windows:
-        copy_cmd(ctx, ctx.file.src, out)
+        copy_cmd(ctx, ctx.executable.src, out)
     else:
-        copy_bash(ctx, ctx.file.src, out)
+        copy_bash(ctx, ctx.executable.src, out)
     runfiles = ctx.runfiles(files = ctx.files.data)
 
     # Bazel 4.x LTS does not support `merge_all`.
@@ -54,9 +54,12 @@
 _ATTRS = {
     "src": attr.label(
         executable = True,
-        allow_single_file = True,
+        # This must be used instead of `allow_single_file` because otherwise a
+        # target with multiple default outputs (e.g. py_binary) would not be
+        # allowed.
+        allow_files = True,
         mandatory = True,
-        cfg = "host",
+        cfg = "target",
     ),
     "data": attr.label_list(allow_files = True),
     # "out" is attr.string instead of attr.output, so that it is select()'able.