internal/postgres: factor out score expression
internal/postgres: factor out score expression

The expression that computes the search score appeared in multiple
places. Factor it out into a const.

Change-Id: Ib02cebed8730e8c0f1c15e3eeee6987a10c2d05d
Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/651423
Reviewed-by: Julie Qiu <e6cb64861edcc38971590ff27c111e0e672de045@google.com>

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