Merge pull request #129 from minrk/quote

unicode fixes for quote
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)