added persistent connection support for both php sockets and curl

made static the userCurl() and useSocket() method

moved the pfsockopen() and the curl_init() into the constructor

added destructor to close curl handle