Refactor embedded_interpreter registration to be friendly to python case (#59991)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59991
add a registration mechanism whereby on loading the embedded interpreter library, a registration function is called which links up the symbols it provides with torch::deploy.
Test Plan: local and CI deploy tests pass
Reviewed By: suo
Differential Revision: D28764436
fbshipit-source-id: 88416bd098be306f887cc9fd2d65d29199439bc4