`gather`: improve error handling and error messages. (#9566)
This PR refactors the `tensor_methods::gather` implementation by
improving its error message, and returning a status type value.
**Key Changes:**
- Make `tensor_methods::gather` return `StatusOr<absl_nonnull
XLATensorPtr>`
- Improve error message on incompatible tensor shapes