Change to_c_repr() to with_c_repr()

This prevents a use-after-free in curl when passing C strings to curl.
Merge remote-tracking branch 'alex/with_c_repr'