mime: use Scanner to read mime files during init
Also close the file when we're done.

R=bradfitz
CC=golang-dev
https://codereview.appspot.com/7363045
A+C: Olivier SAINGRE (individual CLA)

Generated by addca.

R=gobot
CC=golang-dev
https://codereview.appspot.com/7400045
encoding/xml: make sure Encoder.Encode reports Write errors.

Fixes issue 4112.

R=remyoudompheng, daniel.morsing, dave, rsc
CC=golang-dev
https://codereview.appspot.com/7085053

Committer: Brad Fitzpatrick <bradfitz@golang.org>