This change adds support for casting memref from/to memref descriptor
struct via llvm.mlir.dialect_cast op.
To provide verification for this operation rewriting verify method was
needed, which strengthens previous checks by additionally checking
input-output types compatibility.
Such cast is useful when interfacing with code that doesn't need all
information that memref contains, for example requiring only bitcasted
pointer to data.