[mlir][tensor][NFC] Move function comments to where they are declared. (#94002)

According to LLVM style guide, we prefer putting the documentation
comments for public APIs into the header file.

See
https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
for more details.
14 jobs for main
in 0 seconds and was queued for 0 seconds