A number of cleanups.
Use loop label instead of goto.
Fix nil access crash for http requests.
Run gofmt.
Avoid creating unnecessary tls.Certificate structure.