go/types: correct result type for append (bug fix)

Rewrote existing code to prevent similar mistakes.

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