Codecs fix

This fixes a pretty serious issue with the XML codec in that it doesn't escape and unescape characters.
Thus, it's impossible to use characters such as "<" etc..

I also took a stab at the Bach and Packed codecs as they don't escape either. However, given that Bach very much resembles JSON, it seems like a better idea to retire Bach and instead implement JSON (no need to have us maintaining a proprietary codec when there are so many existing to choose from (like YAML)).