fx: Fix type_matches for Optional[List[int]] arguments (#56790)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56790
If the argument doesn't match `List[int]`, this code falls through to
`issubclass(argument_type, List[int])` which is invalid and raises a
`TypeError`. If this happens during the processing of a `Union` (e.g.
`Optional`), the other union types aren't given the chance to match against the
signature.
This also stop normalize_function from indescriminately swallowing exceptions,
which let this bug go unnoticed.
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D27987746
Pulled By: mruberry
fbshipit-source-id: c5aa5f61a215f0f39925e7053f33bff4b5d5acc2