Introducing UnitTests for XmlFormatters to confirm that headers are always written before writing the body.

Issue https://github.com/aspnet/Mvc/issues/607.
There's more methods on headercollection that modify state then this.

Likewise this doesn't protect statuscode