Fix checkfail in UnicodeEncode Op
The Op UnicodeEncode segfaults when passed 2D tensor to `input_splits`.

It has the below check in `SetShapeFn` which supposed to raise exception if `rank !=1` AFAIk. This seems not working for reason unknown to me.

https://github.com/tensorflow/tensorflow/blob/6f64ad5d767a034df45a5eaab8b36fd688cd1217/tensorflow/core/ops/string_ops.cc#L316-L317

Same with `input_values` argument also.
 
Added an explicit check in Op.

Ref issue #63379