encoding/xml: add Encoder.Flush

Fixes issue 6365.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/13627046