Work on merging parse() of gofmt and go/format, fixing 5551 and 4449.

Tests pass.