CB-5468 improve config.xml encoding handling

https://issues.apache.org/jira/browse/CB-5468

Assume files without a BOM are UTF-8 anyway