Revert "[aot] Add types from the method header even for gshared methods."

This reverts commit 70d7512ac84dcaf903b80f80b36aafe210337a9a.
[aot] Applied patch from "Andrés G. Aragoneses" <knocte@gmail.com>: Add types from the method header even for gshared methods.