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

The previous logic would descend into (e.g.) .git repositories
and vendored packages with "_"-prefixed names.

Fixes issue 8907

LGTM=gri
R=gri
CC=golang-codereviews, shurcool
https://codereview.appspot.com/157800043

karmakaze/go.tools,karmakaze/go.tools,karmakaze/go.tools,karmakaze/go.tools,karmakaze/go.tools