[RecordFunction][Trivial] Reorder `record_function.h` (#75036)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75036
Move `RecordFunctionCallback` and `ThreadLocalRecordFunctionCallbacksEntry` up in the header.
This is part of a large scale refactor of RecordFunction. Right now the RecordFunction type isn't aware of the callback types, and instead uses `CallbackHandle`s to store which functions to run. Future changes will directly store pointers in RecordFunction, but to do that we have to shuffle some code around.
Test Plan: Unit tests are sufficient.
Reviewed By: chaekit
Differential Revision: D35276156
fbshipit-source-id: adab619ca799c279667060867f845b55441cbaf9
(cherry picked from commit 4c3af42964627e52d1c3fd14fd0a4cc53258d9f7)