fdo#81044 detect UTF-8 BOM too

Change-Id: I6fd041780b889e2125b916964ba27d032667dcd6
Reviewed-on: https://gerrit.libreoffice.org/10742
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>