Release resources with "Discard All" when return connection into pool 

Hi Francisco,

I had made a new patch to release resources clearly with "Discard ALL" when return a connection into the pool,which is based on the following discussion. 
http://pgfoundry.org/tracker/index.php?func=detail&aid=1011241&group_id=1000140&atid=592

The major modificaions is as the following
1)Release resources with "Discard ALL" if the backend is 8.3 or later and the protocol is V3.
"Discard ALL" is introduced since 8.3 and it is not able to set session configulations via starup package while use protocol V2. So keep their behaviors as before.

2)Refactor the code to send starup package.
When use protocol V3,set session configulations via starup package,other than execute "set xxxx=yyy" later.

3)Add a test case


--
Regards, 
Chen Huajun