Fix writing of XML CAF documents

The overflow() signature had been modified in OCE when fixing
compiler warnings, but this broke writing XML files.
Add a test case for issue #441
Merge pull request #441 from tpaviot/review/fix-writing-XCAF

Fix writing of XML CAF documents