[NFC][mlir][bufferization] Remove getMemRefType() helper (#199034)
Replace getMemRefType() helper with a direct usage of
options.unknownTypeConverterFn() hook. This does not change any
behaviour since all the existing call-sites would already implicitly
call the hook. The major difference could have been in the handling of
the memref layout but this does not seem to be properly handled anyhow.
As the `getMemRefType()` helper is removed, there are two cases to keep
in mind for downstream users that need to adjust the code accordingly:
1. For creating memrefs without layouts, call
`options.unknownTypeConverterFn` hook directly (the same way this patch
is doing for upstream)
2. For creating memrefs with layouts (assuming, custom ones), please
(re)implement the same helper. As only ranked memrefs can have a layout,
a call to `mlir::MemRefType::get(shape, elementType, /*your custom
layout=*/myLayout, memorySpace)` should be sufficient.