Fix https resolution order and file descriptor leak
Fix https resolution order and file descriptor leak

lyoshenka/PyPagekite,pagekite/PyPagekite,pagekite/PyPagekite,output/PyPagekite,lyoshenka/PyPagekite,pagekite/PyPagekite,output/PyPagekite,output/PyPagekite,lyoshenka/PyPagekite