OOIION 1386: Performance gains: move unicode handling out of validating_setattr

This mirrors the fixes in master.

Wait with merge until ion-definitions pointer is updated