compiler: support go:noescape cross package
CL 83876 added support of go:noescape pragma, but it only works
for functions called from the same package. The pragma did not
take effect for exported functions that are not called from
the same package. The reason is that top level function
declarations are not traversed, and only reached from calls
from other functions. This CL adds this support. The Traverse
class is extended with a mode to traverse function declarations.
Reviewed-on: https://go-review.googlesource.com/85637
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256405 138bc75d-0d04-0410-961f-82ee72b054a4