Add Utf16Encoder. Generalize Utf16CodeUnits for any Iterator<char>.

This allows encoding to UTF-16 something that is not in UTF-8, e.g. a
`[char]` UTF-32 string.

This might help with https://github.com/servo/servo/issues/4023
auto merge of #19042 : SimonSapin/rust/generic-utf16-encoder, r=alexcrichton

This allows encoding to UTF-16 something that is not in UTF-8, e.g. a `[char]` UTF-32 string.

This might help with servo/servo#4023