Add proxy and auth support to wfs client (#3982)

Copied & adapted from similar code in mapwmslayer.c.

Fix two copy-pasto errors while here, wfs_http_cookie was not
looked up.

Tested successfully with a simple wfs remote layer using wfs_auth_type basic + username/password, and same with ows_auth_type/ows_auth_username/ows_auth_password. Proxy support untested, and other auth types untested.

I'll happily do as dmorissette advices in issue #3982, but i dont really know the codebase so where should this common code go ?