Allow writing of MD5 char array directly

Modify the string writing code to avoid additional heap allocations,
preferring instead to send more writes. Socket writes to the database
will usually be local, so fairly cheap, especially if Nagle's algorithm
is not disabled for the database connection.

As well as reducing Garbage Collection, reducing the number of heap
allocations reduces the copies of the written data in memory. This is
important because the passwords are sent using this call, and keeping
them in one memory location is expected to be more secure.