make FunctionType a NamedType (#24280)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24280
This simplifies the groundwork for serializing functions.
Test Plan: Imported from OSS
Differential Revision: D16800560
Pulled By: suo
fbshipit-source-id: 129b32dddb39494daeade33c87d76248486a86b2