Add to_xml method to core classes

After seeing #6534 I found out that there is no XML equivalent of `to_json` method in Rails core. As some of us are still using XML I thought that I could prepare proof of concept of such method and see if it is good idea.

It's current state is far from perfect(not to mention lack of tests), but my main idea is to ask if I'm going in right direction? If so I would gladly improve code base and write more tests, but right now I could use some sanity check and opinions from more experienced Rails core developers about way I'm trying to do that.

From my perspective the biggest gain would be calling methods like `render :xml => true` - in some cases that could be useful and this is allowed in XML spec, but I'm not sure if it will not break something.