[cairo] Protect against infinite loops Fixes https://github.com/harfbuzz/harfbuzz/issues/4375 Maybe we should do this in hb-ft and COLR instead?