internal/postgres: optimize search query
internal/postgres: optimize search query

postgres.Search is optimized and returns the following search latency
when tested against dev. Searching for:

"github": 5.7s
"cloud": 1.8s
"elasticsearch": 656ms

It may be optimized further in future CLs. We may also switch to
elasticsearch before then.

Updates b/140893426

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

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