fdo#46262 Detect XML files with UTF-8 BOM

Also convert sal_Char (deprecated) -> char

Change-Id: Ibf66f6a9ea751bab96f43671fe95a835c073d9e0
Reviewed-on: https://gerrit.libreoffice.org/6942
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>