Fix custom call legalization `mhlo` -> `stablehlo`
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this [failed invocation](https://github.com/tensorflow/tensorflow/pull/66847/checks?check_run_id=24513679185) of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.
Fix custom call legalization `mhlo` -> `stablehlo`

This change ports the fix for legalization custom call from mhlo to stablehlo. This fix existed in the `standard` path (`matchAndRewrite` function), this change applies it in the path where custom call has public features not yet supported in stablehlo (`rewriteMhloOpAsCustomCall` function). It allows to legalize typed FFI custom call.
