redirect blob to tree

relies on raw.github.com redirect behavior,
which may not be reliable (I think it's different now from a few days ago).
Merge pull request #126 from minrk/blob-redirect

redirect blob to tree
combine error templates
add 502 template
adjust custom error handling

- cast upstream errors to 502 (Bad Gateway), rather than just re-raising.
- 400 errors in remote fetch should be 500
- remote 404 is distinguishable from local 404 (still 404, though)
turn DNS errors into 404
remove erroneous self
HTTPError.response may be None