fix: test goroutine leaks (#643)

Ensure that goroutines started by tests are cleaned up on termination.

Also:
* make TestLatencyHistories compatible with -count=X.
* Update to the supported versions of go 1.19 and 1.20.
* Update golangci-lint to v1.15.2

Fixes #641
4 files changed