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