Add a SERIALIZE-FOR-POSTGRES generic method.

It can be customized to serialize lisp values directly into the socket
stream either as string or as bytes. Defaults to TO-SQL-STRING.

E.g. the integration with local-time can use it to emit the binary
timestamp format of PostgreSQL and avoid printing and parsing of
human readable timestamp strings.