[mlir] Move memref.dim canonicalization using InferShapedTypeOpInterface to a separate pass.
Based on dicussion in
thread the pattern to resolve the memref.dim of a value that is a
result of an operation that implements the
InferShapedTypeOpInterface is moved to a separate pass instead of
running it as a canonicalization pass. This allows shape resolution to
happen when explicitly required, instead of automatically through a
Differential Revision: https://reviews.llvm.org/D104321