This patch fixes two bugs related to setUseServerPrepare() (and adds
unit tests for them):
1. Turning server-prepare from on to off before a query is executed results
in an invalid "DEALLOCATE null" query being sent to the backend.
2. setBytes() uses a type of 'text' not 'bytea' when generating a PREPARE,
resulting in typecasting problems.
-O