Makes <<__Memoize>> work for top-level functions
Summary: It's a little silly to apply <<__Memoize>> to a top-level function with zero args, but with this diff the attribute can be tagged to every kind of function we want to build for. That way, as I add args it will work for all of them.
For tests, I couldn't actually figure out how to apply user attributes to inline functions without it being a syntax error. If you know how to do it I'll add a test.
While working on this diff I found that locals from the implementation were incorrectly also being emitted as locals in the memoization wrapper. This diff fixes that issue.
Reviewed By: @jano, @elgenie
Differential Revision:
D1506790