Fix some real world issues with trailing whitespaces in XML exports
Remove debugging
Fix issue in caGetUserLocaleRules where rules for empty item locales would be cached.

It's possible that this could only occur in CLI scripts. It basically
caused BaseModelWithAttributes::get() to not respect the 'locale'
setting.
Added locale setting to exporter mapping items