fix a couple regressions in recent PRs

- str.encode('string_escape') doesn't exist in Python 3
- use app_log, not self.log in GitHubClient
- only warn about the absence of rate headers on successful requests (400 doesn't always include rate headers)
Merge pull request #386 from minrk/404-500

fix a couple regressions in recent PRs