feat(fix-update): allow user to profile commands with pprof (#1685)

This adds two flags to the `fix` and the `update` command, `-cpuprofile` and `-memprofile`, which allow users to create output CPU and memory `pprof` files to better understand the performance of Gazelle. This is very helpful in debugging issues like #1688, which show up in certain repository setups.

The implementation mostly followed the instructions on https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program to set up profiling options for the command in the `cmd/gazelle`.

Tests were added to ensure that the `newProfile` would return a `profile{}` that wouldn't panic, even if either provider is empty.

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
6 files changed