internal/postgres: cleanup of getVersion
internal/postgres: cleanup of getVersion

- Rename to add the word "Package," since module functions are coming.

- Remove unused fields from query.

- Scan directly into struct.

- Move variable declarations closer to use.

Change-Id: I0f77ca04d989863a3ce4721267e8dec7d0ae37c3
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/527170
Reviewed-by: Robert Findley <9179eee875d1ee628c37fb47d7e749e855ffd21f@google.com>

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