Change temporal to_string routines to use snprintf instead of sprintf. Also change length parameter to be length of string to write to, and add return value of length written (or what would have - i.e. snprintf result).
This doesn't fix https://bugs.launchpad.net/drizzle/+bug/373468 but it means we hit an assert() on being able to put the temporal type into a string instead of overwriting the buffer.