8349239: [BACKOUT] Reuse StringLatin1::putCharsAt and StringUTF16::putCharsAt Reviewed-by: redestad, liach