Refactor proxy-enabled payload handling

This fixes a couple bugs and generally cleans up the proxy option parsing code. 
I don't think ```@proxy_settings[:type] == "HTTP"``` will ever be true because the ```PROXY_TYPE``` datastore option isn't defined for python because only HTTP proxies and not SOCKS proxies can be supported with the standard lib.