internal/worker: refactor fetch_test.go
internal/worker: refactor fetch_test.go

Tests for FetchAndUpdateState are refactored, since there was a lot of
duplicated logic across these test. These tests now use the
checkPackageVersionStates and fetchAndCheckStatus helper functions to
call FetchAndUpdateState and check the corresponding output.

Change-Id: I431b0cb3862b5b76b6c3cf85cb07fa9a9f11d941
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247192
Reviewed-by: Jonathan Amsterdam <e3d3698b2ccd5955e4adf250d0785062d0f9018b@google.com>

golang/pkgsite,golang/pkgsite,golang/pkgsite,golang/pkgsite