[glib] Add two-way script conversion functions Also optimizes the common-direction script lookup to be an array lookup.