Reorginize all source code, put extern in function prototypes.

Changed global variables to static and provide http_proxy_url
function to modify them.

Changed _VERBOSE define to _DEBUG that is more common.

TODO: Add init and free method.