gopackagesdriver: log events using slog (#4566)

**What type of PR is this?**

> Feature

**What does this PR do? Why is it needed?**

When GOPACKAGESDRIVER_LOG is set, gopackagesdriver now logs events by
appending JSON objects to the file. This is useful for finding arguments
gopackagesdriver was invoked with, bazel commands it ran, bazel exit
codes returned, and bazel stderr.

**Which issues(s) does this PR fix?**

For #4565

**Other notes for review**
3 files changed