[afshaper] Fix hb_ot_tags_from_script deprecation warning.
Copy as suggested in https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle at most three tags.
Copy as suggested in https://github.com/harfbuzz/harfbuzz/issues/2737 and adjust to handle at most three tags.