runtime: profile finalizer G more carefully in goroutine profile
runtime: profile finalizer G more carefully in goroutine profile

If SetFinalizer is never called, we might readgstatus on a nil fing
variable, resulting in a crash. This change guards code that accesses
fing by a nil check.

Fixes #52821.

Change-Id: I3e8e7004f97f073dc622e801a1d37003ea153a29
Reviewed-on: https://go-review.googlesource.com/c/go/+/405475
Run-TryBot: Michael Knyszek <4473450dc5c88f06e1fb787f303d7805ec2aee65@google.com>
Reviewed-by: Bryan Mills <1c8aad60184261ccede67f5c63a0d2a3bf3c9ff4@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Rhys Hiltner <bcfcf56a981f09329b467441681acc1974fbfdf3@justin.tv>

golang/go,nawawi/go,golang/go,nawawi/go,golang/go,golang/go,nawawi/go,golang/go,nawawi/go,nawawi/go,golang/go,nawawi/go,nawawi/go,nawawi/go,golang/go,golang/go