Add float16 type support to SplitToSequence and make code type independent (#18594)
### Description
Add support for `float16` type to address the below issue.
Re-work the code to make it type independent.
This reduces binary size by ~11 K.

### Motivation and Context
This PR addresses https://github.com/microsoft/onnxruntime/issues/18481