go/ast: distinguish between methods and functions in filtering

Go1.1 harmless, but not critical.

Fixes issue 5249.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/8609043