go/types: avoid os.Getwd if not necessary

Getwd can be very expensive.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/7312100
encoding/json: roll back Unmarshal optimization + test

The second attempt at the Unmarshal optimization allowed
panics to get out of the json package. Add test for that bug
and remove the optimization.

Let's stop trying to optimize Unmarshal.

Fixes issue 4784.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/7300108
cmd/8g: fix sse2 compare code gen

Fixes issue 4785.

R=ken2
CC=golang-dev
https://codereview.appspot.com/7300109