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