encoding/xml: add, support Marshaler interface

See golang.org/s/go12xml for design.

Repeat of CL 12603044, which was submitted accidentally
and then rolled back.

Fixes issue 2771.
Fixes issue 4169.
Fixes issue 5975.
Fixes issue 6125.

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