`uniform_`: improve error handling and error messages. (#9635)
This PR refactors the `uniform_` operation implementation by improving
its error message, and returning a status type value.
**Key Changes:**
- Make `tensor_methods::uniform_` return `Status`
- Improve error messages and error handling
- Add `CheckUniformRangeIsValid` function