[mlir][tosa] Improve performance of tosa.transpose constant folding
Folding of the tosa.transpose operation is both time and memory
intensive as the underlying ElementsAttr is processed as a sequence of
Attributes. This change attempts operate on the underlying raw data of
the ElementsAttr.
In an example resnet50 network, this change reduces the time spent in
folding transpose ops from 35s to 1.5s.
Reviewed By: GeorgeARM, rsuderman, stellaraccident
Differential Revision: https://reviews.llvm.org/
D146526