make CompilationUnit::define return defined functions
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22667
Test Plan: Imported from OSS
Differential Revision: D16184799
Pulled By: suo
fbshipit-source-id: 9f77a7ca2223237fbcb4b12a4734b7d334f7be13