Add specs on EncodingConverter#primitive_convert on clearing the source buffer.
Fix EncodingConverter#primitive_convert on clearing the source buffer.
Update existing usage of EncodingConverter#primitive_convert after fixes.