Reworked BOM declarations (inspired by File::BOM)

Use generic approach (Encode) to generate "fingerprints".