Fix compile wrapper (#5455)
compile wrapper will inherit from user module class and copy it's
__dict__
This should resolve most issues in #5383 except potential extra user
forward hooks.
@tohtana @loadams
Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
Co-authored-by: Olatunji Ruwase <olruwase@microsoft.com>
Co-authored-by: Masahiro Tanaka <81312776+tohtana@users.noreply.github.com>