Add failing test for heroku ssl connection
Add heroku password to heroku test
Fix JavaScript SSL upgrade logic

I had accepted the pull request way back without proper test coverage.
I've added test coverage & fixed this long-standing bug.
Make test more robust
Merge pull request #386 from brianc/js-ssl

Fix long-standing hanging SSL connection but with JavaScript