Fix a race where closure classes can be used before they are defined

Summary: See the comments in the code.

There is a more general issue here, and the ideal solution is probably to load
all the persistent classes out of the repo before we start running any
requests.  @jasone's change to attempt that was causing a performance regression,
so we'd have to figure out why if we want to do things that way.

Reviewed By: @markw65

Differential Revision: D1414912