XmlEncoder Support for Map and Set Collections.

I've been using these changes in local builds without problems and thought they might be useful for others. 

I'm happy to change anything that appears amiss!

:shipit: