go.tools/imports: use same logic as 'go' tool for pruning package search.
go.tools/imports: use same logic as 'go' tool for pruning package search.

The previous logic would descend into "_"-prefixed names, "testdata" folders,
and skipped folders beginning with a digit.

Fixes golang/go#8958.

LGTM=bradfitz
R=golang-codereviews, dave, bradfitz
CC=golang-codereviews
https://golang.org/cl/167000043

sshetty10/tools,cmars/tools,golang/tools,matryer/tools,nicot/tools,syreclabs/go-tools,magiccao/tools,argandas/tools,glasser/golang-tools,josharian/tools,springning/tools,nicot/tools,cw2018/tools,glasser/golang-tools,cw2018/tools,jdhenke/tools,dmitris/tools,sshetty10/tools,syreclabs/go-tools,jdhenke/tools,maddyonline/tools,dmitris/tools,jdhenke/tools,josharian/tools,4ad/tools,matryer/tools,glasser/golang-tools,springning/tools,golang/tools,runcom/tools,dmitris/tools,dmitris/tools,jdhenke/tools,springning/tools,josharian/tools,syreclabs/go-tools,golang/tools,matryer/tools,sshetty10/tools,maddyonline/tools,josharian/tools,sshetty10/tools,glasser/golang-tools,springning/tools,golang/tools,syreclabs/go-tools,nicot/tools,magiccao/tools,argandas/tools,argandas/tools,magiccao/tools,cw2018/tools,syreclabs/go-tools,cmars/tools,4ad/tools,argandas/tools,matryer/tools,maddyonline/tools,cw2018/tools,runcom/tools,4ad/tools,nicot/tools,runcom/tools,syreclabs/go-tools,maddyonline/tools,cmars/tools,golang/tools,magiccao/tools,cmars/tools,runcom/tools