Add the parse_netrc function
Add the parse_netrc function

The existing `read_netrc` function can only be used from repository rules.
This makes it harder to e.g. test code that builds on top of `read_netrc`.
The new function is pure and can be easily tested.

Closes #12681.

PiperOrigin-RevId: 351586361

ButterflyNetwork/bazel,cushon/bazel,perezd/bazel,cushon/bazel,perezd/bazel,twitter-forks/bazel,katre/bazel,cushon/bazel,bazelbuild/bazel,twitter-forks/bazel,perezd/bazel,ButterflyNetwork/bazel,perezd/bazel,meteorcloudy/bazel,meteorcloudy/bazel,perezd/bazel,meteorcloudy/bazel,perezd/bazel,perezd/bazel,cushon/bazel,bazelbuild/bazel,twitter-forks/bazel,ButterflyNetwork/bazel,katre/bazel,cushon/bazel,bazelbuild/bazel,katre/bazel,bazelbuild/bazel,katre/bazel,katre/bazel,meteorcloudy/bazel,ButterflyNetwork/bazel,meteorcloudy/bazel,bazelbuild/bazel,twitter-forks/bazel,cushon/bazel,bazelbuild/bazel,ButterflyNetwork/bazel,katre/bazel,twitter-forks/bazel,meteorcloudy/bazel,ButterflyNetwork/bazel,twitter-forks/bazel,meteorcloudy/bazel,twitter-forks/bazel