Copying changes made in the IA SVN repository to our git repo.
These changes mostly address issues with HTTPS support.
Closes openlibrary/bookreader#30