log: rephrase default sr_logv() routine, strip CR and LF
Unobfuscate how the unconditional prefix and the conditional timestamp
will prefix the caller's message. Separate the result check for emission
of the prefix/timestamp from the check for successful construction of
the caller's message text. Release the dynamic buffer in the error path.
Use pointers and character variables in the copy loop for readability.
Strip LF as well as CR from the resulting log output text. The previous
implementation exclusively stripped LF. Escaping non-printables is not
attempted in this version.