Merge pull request #254 from shazow/factorout-connectioncls

Factor out HTTP(S)Connection -> ConnectionCls, and cleanup.