call bytestring on String arguments in ccalls that require Ptr{Uint8} conversion

The basic issue is that `String` arguments need to be passed through `bytestring` before being converted to `Ptr{Uint8}` by `ccall`.  This should have no overhead for the common cases since `bytestring(s::ByteString) = s` should be inlined.

Among other things, this fixes #5673, and subsumes #5675.