Extension testing and extra cURL options

This patch adds:

 1. Better testing of the needed extensions. Assumes PHP 5.0.0 as minimum.

 2. Extra cURL options so that we can handle things like proxies and also in the future add extensive logging
     that could include the returned headers, etc.

This is used on the Drupal Commerce integration module.