Make TypeDescriptor serializable

Issue: SPR-10631
(cherry picked from 9eb596a)