go/types: remove most remaining uses of ast.Object from exported API

Also: Return first error whether an error handler is set in the
      context or not (bug fix).

R=adonovan
CC=golang-dev
https://codereview.appspot.com/7024043